home *** CD-ROM | disk | FTP | other *** search
/ Beginning Mac Programming / Beginning Mac Programming.bin / pc / Open Me for REALbasic 3 / REALbasic 3.2 / Example Projects / Applications / ListsInFiles / FileListMethods < prev    next >
RealBasic Project  |  2000-12-12  |  17.0 KB

open in: MacOS 8.1     |     Win98     |     DOS

view JSON data     |     view as text


This file was processed as: RealBasic Project (other/realBasicProject).
This format is not currently supported by dexvert.

ConfidenceProgramDetectionMatch TypeSupport
1% dexvert RealBasic Project (other/realBasicProject) magic Unsupported
100% file data default
100% TrID REALbasic/Xojo Project default



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 52 62 42 46 00 00 00 01 | 00 00 00 00 00 00 00 00 |RbBF....|........|
|00000010| 00 00 00 14 42 6c 6f 6b | 70 4f 62 6a 00 00 00 08 |....Blok|pObj....|
|00000020| 00 00 00 00 00 00 44 00 | 00 00 00 00 6b a9 c8 76 |......D.|....k..v|
|00000030| 23 48 53 ed 4e 61 6d 65 | 53 74 72 6e 00 00 00 0f |#HS.Name|Strn....|
|00000040| 46 69 6c 65 4c 69 73 74 | 4d 65 74 68 6f 64 73 00 |FileList|Methods.|
|00000050| 43 6f 6e 74 49 6e 74 20 | 00 00 00 00 62 43 6c 73 |ContInt |....bCls|
|00000060| 49 6e 74 20 00 00 00 00 | 72 45 64 74 52 65 63 74 |Int ....|rEdtRect|
|00000070| 00 00 00 27 00 00 00 9c | 00 00 02 81 00 00 01 a9 |...'....|........|
|00000080| 49 6e 74 72 53 74 72 6e | 00 00 00 00 4e 61 6d 65 |IntrStrn|....Name|
|00000090| 53 74 72 6e 00 00 00 0f | 46 69 6c 65 4c 69 73 74 |Strn....|FileList|
|000000a0| 4d 65 74 68 6f 64 73 00 | 53 69 7a 65 49 6e 74 20 |Methods.|SizeInt |
|000000b0| 00 00 00 28 62 4e 74 72 | 49 6e 74 20 00 00 00 00 |...(bNtr|Int ....|
|000000c0| 50 72 6f 70 47 72 75 70 | 00 00 00 30 00 00 00 02 |PropGrup|...0....|
|000000d0| 64 65 63 6c 53 74 72 6e | 00 00 00 13 6e 75 6d 4c |declStrn|....numL|
|000000e0| 69 73 74 73 20 61 73 20 | 69 6e 74 65 67 65 72 00 |ists as |integer.|
|000000f0| 66 6c 61 67 49 6e 74 20 | 00 00 00 00 45 6e 64 47 |flagInt |....EndG|
|00000100| 49 6e 74 20 00 00 00 02 | 50 72 6f 70 47 72 75 70 |Int ....|PropGrup|
|00000110| 00 00 00 30 00 00 00 03 | 64 65 63 6c 53 74 72 6e |...0....|declStrn|
|00000120| 00 00 00 13 6e 75 6d 53 | 69 7a 65 73 20 61 73 20 |....numS|izes as |
|00000130| 69 6e 74 65 67 65 72 00 | 66 6c 61 67 49 6e 74 20 |integer.|flagInt |
|00000140| 00 00 00 00 45 6e 64 47 | 49 6e 74 20 00 00 00 03 |....EndG|Int ....|
|00000150| 50 72 6f 70 47 72 75 70 | 00 00 00 34 00 00 00 04 |PropGrup|...4....|
|00000160| 64 65 63 6c 53 74 72 6e | 00 00 00 15 62 53 69 7a |declStrn|....bSiz|
|00000170| 65 73 28 31 36 29 20 61 | 73 20 69 6e 74 65 67 65 |es(16) a|s intege|
|00000180| 72 00 00 00 66 6c 61 67 | 49 6e 74 20 00 00 00 00 |r...flag|Int ....|
|00000190| 45 6e 64 47 49 6e 74 20 | 00 00 00 04 50 72 6f 70 |EndGInt |....Prop|
|000001a0| 47 72 75 70 00 00 00 38 | 00 00 00 05 64 65 63 6c |Grup...8|....decl|
|000001b0| 53 74 72 6e 00 00 00 1c | 74 65 78 74 4c 69 73 74 |Strn....|textList|
|000001c0| 42 6c 6f 63 6b 54 79 70 | 65 20 61 73 20 69 6e 74 |BlockTyp|e as int|
|000001d0| 65 67 65 72 66 6c 61 67 | 49 6e 74 20 00 00 00 00 |egerflag|Int ....|
|000001e0| 45 6e 64 47 49 6e 74 20 | 00 00 00 05 4d 65 74 68 |EndGInt |....Meth|
|000001f0| 47 72 75 70 00 00 01 b4 | 00 00 00 06 6e 61 6d 65 |Grup....|....name|
|00000200| 53 74 72 6e 00 00 00 06 | 69 6e 69 74 44 42 00 00 |Strn....|initDB..|
|00000210| 70 61 72 6d 53 74 72 6e | 00 00 00 24 6e 4c 69 73 |parmStrn|...$nLis|
|00000220| 74 73 20 61 73 20 69 6e | 74 65 67 65 72 2c 20 6e |ts as in|teger, n|
|00000230| 54 79 70 65 73 20 61 73 | 20 69 6e 74 65 67 65 72 |Types as| integer|
|00000240| 72 73 6c 74 53 74 72 6e | 00 00 00 00 66 6c 61 67 |rsltStrn|....flag|
|00000250| 49 6e 74 20 00 00 00 00 | 73 6f 72 63 47 72 75 70 |Int ....|sorcGrup|
|00000260| 00 00 01 3c 00 00 00 07 | 73 74 73 72 49 6e 74 20 |...<....|stsrInt |
|00000270| 00 00 00 03 73 74 73 63 | 49 6e 74 20 00 00 00 15 |....stsc|Int ....|
|00000280| 6e 64 73 72 49 6e 74 20 | 00 00 00 03 6e 64 73 63 |ndsrInt |....ndsc|
|00000290| 49 6e 74 20 00 00 00 15 | 73 72 63 6c 53 74 72 6e |Int ....|srclStrn|
|000002a0| 00 00 00 30 53 75 62 20 | 69 6e 69 74 44 42 28 6e |...0Sub |initDB(n|
|000002b0| 4c 69 73 74 73 20 61 73 | 20 69 6e 74 65 67 65 72 |Lists as| integer|
|000002c0| 2c 20 6e 54 79 70 65 73 | 20 61 73 20 69 6e 74 65 |, nTypes| as inte|
|000002d0| 67 65 72 29 73 72 63 6c | 53 74 72 6e 00 00 00 34 |ger)srcl|Strn...4|
|000002e0| 2f 2f 20 49 6e 69 74 69 | 61 6c 69 7a 65 73 20 74 |// Initi|alizes t|
|000002f0| 68 65 20 67 6c 6f 62 61 | 6c 73 20 27 6e 75 6d 4c |he globa|ls 'numL|
|00000300| 69 73 74 73 27 20 61 6e | 64 20 27 6e 75 6d 53 69 |ists' an|d 'numSi|
|00000310| 7a 65 73 27 73 72 63 6c | 53 74 72 6e 00 00 00 2d |zes'srcl|Strn...-|
|00000320| 6e 75 6d 4c 69 73 74 73 | 20 3d 20 6e 4c 69 73 74 |numLists| = nList|
|00000330| 73 20 2f 2f 20 74 68 65 | 20 6e 75 6d 62 65 72 20 |s // the| number |
|00000340| 6f 66 20 64 61 74 61 20 | 6c 69 73 74 73 00 00 00 |of data |lists...|
|00000350| 73 72 63 6c 53 74 72 6e | 00 00 00 2e 6e 75 6d 53 |srclStrn|....numS|
|00000360| 69 7a 65 73 20 3d 20 6e | 54 79 70 65 73 20 2f 2f |izes = n|Types //|
|00000370| 20 74 68 65 20 6e 75 6d | 62 65 72 20 6f 66 20 62 | the num|ber of b|
|00000380| 6c 6f 63 6b 20 73 69 7a | 65 73 00 00 73 72 63 6c |lock siz|es..srcl|
|00000390| 53 74 72 6e 00 00 00 07 | 45 6e 64 20 53 75 62 00 |Strn....|End Sub.|
|000003a0| 45 6e 64 47 49 6e 74 20 | 00 00 00 07 45 6e 64 47 |EndGInt |....EndG|
|000003b0| 49 6e 74 20 00 00 00 06 | 4d 65 74 68 47 72 75 70 |Int ....|MethGrup|
|000003c0| 00 00 01 94 00 00 00 08 | 6e 61 6d 65 53 74 72 6e |........|nameStrn|
|000003d0| 00 00 00 0c 64 65 63 6c | 61 72 65 42 6c 6f 63 6b |....decl|areBlock|
|000003e0| 70 61 72 6d 53 74 72 6e | 00 00 00 20 74 79 70 65 |parmStrn|... type|
|000003f0| 20 61 73 20 69 6e 74 65 | 67 65 72 2c 20 73 69 7a | as inte|ger, siz|
|00000400| 65 20 61 73 20 69 6e 74 | 65 67 65 72 72 73 6c 74 |e as int|egerrslt|
|00000410| 53 74 72 6e 00 00 00 00 | 66 6c 61 67 49 6e 74 20 |Strn....|flagInt |
|00000420| 00 00 00 00 73 6f 72 63 | 47 72 75 70 00 00 01 1c |....sorc|Grup....|
|00000430| 00 00 00 09 73 74 73 72 | 49 6e 74 20 00 00 00 01 |....stsr|Int ....|
|00000440| 73 74 73 63 49 6e 74 20 | 00 00 00 04 6e 64 73 72 |stscInt |....ndsr|
|00000450| 49 6e 74 20 00 00 00 01 | 6e 64 73 63 49 6e 74 20 |Int ....|ndscInt |
|00000460| 00 00 00 04 73 72 63 6c | 53 74 72 6e 00 00 00 32 |....srcl|Strn...2|
|00000470| 53 75 62 20 64 65 63 6c | 61 72 65 42 6c 6f 63 6b |Sub decl|areBlock|
|00000480| 28 74 79 70 65 20 61 73 | 20 69 6e 74 65 67 65 72 |(type as| integer|
|00000490| 2c 20 73 69 7a 65 20 61 | 73 20 69 6e 74 65 67 65 |, size a|s intege|
|000004a0| 72 29 00 00 73 72 63 6c | 53 74 72 6e 00 00 00 2d |r)..srcl|Strn...-|
|000004b0| 2f 2f 20 44 65 63 6c 61 | 72 65 73 20 62 6c 6f 63 |// Decla|res bloc|
|000004c0| 6b 20 27 74 79 70 65 27 | 20 74 6f 20 68 61 76 65 |k 'type'| to have|
|000004d0| 20 27 73 69 7a 65 27 20 | 62 79 74 65 73 00 00 00 | 'size' |bytes...|
|000004e0| 73 72 63 6c 53 74 72 6e | 00 00 00 2c 2f 2f 20 6f |srclStrn|...,// o|
|000004f0| 66 20 64 61 74 61 20 28 | 70 6c 75 73 20 31 32 20 |f data (|plus 12 |
|00000500| 62 79 74 65 73 20 66 6f | 72 20 70 6f 69 6e 74 65 |bytes fo|r pointe|
|00000510| 72 73 20 65 74 63 2e 29 | 73 72 63 6c 53 74 72 6e |rs etc.)|srclStrn|
|00000520| 00 00 00 13 62 53 69 7a | 65 73 28 74 79 70 65 29 |....bSiz|es(type)|
|00000530| 20 3d 20 73 69 7a 65 00 | 73 72 63 6c 53 74 72 6e | = size.|srclStrn|
|00000540| 00 00 00 07 45 6e 64 20 | 53 75 62 00 45 6e 64 47 |....End |Sub.EndG|
|00000550| 49 6e 74 20 00 00 00 09 | 45 6e 64 47 49 6e 74 20 |Int ....|EndGInt |
|00000560| 00 00 00 08 4d 65 74 68 | 47 72 75 70 00 00 05 ac |....Meth|Grup....|
|00000570| 00 00 00 0a 6e 61 6d 65 | 53 74 72 6e 00 00 00 08 |....name|Strn....|
|00000580| 6e 65 77 42 6c 6f 63 6b | 70 61 72 6d 53 74 72 6e |newBlock|parmStrn|
|00000590| 00 00 00 23 62 73 20 61 | 73 20 62 69 6e 61 72 79 |...#bs a|s binary|
|000005a0| 53 74 72 65 61 6d 2c 20 | 74 79 70 65 20 61 73 20 |Stream, |type as |
|000005b0| 69 6e 74 65 67 65 72 00 | 72 73 6c 74 53 74 72 6e |integer.|rsltStrn|
|000005c0| 00 00 00 07 69 6e 74 65 | 67 65 72 00 66 6c 61 67 |....inte|ger.flag|
|000005d0| 49 6e 74 20 00 00 00 00 | 73 6f 72 63 47 72 75 70 |Int ....|sorcGrup|
|000005e0| 00 00 05 2c 00 00 00 0b | 73 74 73 72 49 6e 74 20 |...,....|stsrInt |
|000005f0| 00 00 00 02 73 74 73 63 | 49 6e 74 20 00 00 00 16 |....stsc|Int ....|
|00000600| 6e 64 73 72 49 6e 74 20 | 00 00 00 02 6e 64 73 63 |ndsrInt |....ndsc|
|00000610| 49 6e 74 20 00 00 00 16 | 73 72 63 6c 53 74 72 6e |Int ....|srclStrn|
|00000620| 00 00 00 41 46 75 6e 63 | 74 69 6f 6e 20 6e 65 77 |...AFunc|tion new|
|00000630| 42 6c 6f 63 6b 28 62 73 | 20 61 73 20 62 69 6e 61 |Block(bs| as bina|
|00000640| 72 79 53 74 72 65 61 6d | 2c 20 74 79 70 65 20 61 |ryStream|, type a|
|00000650| 73 20 69 6e 74 65 67 65 | 72 29 20 41 73 20 69 6e |s intege|r) As in|
|00000660| 74 65 67 65 72 00 00 00 | 73 72 63 6c 53 74 72 6e |teger...|srclStrn|
|00000670| 00 00 00 28 2f 2f 20 44 | 65 6c 69 76 65 72 73 20 |...(// D|elivers |
|00000680| 61 20 70 6f 69 6e 74 65 | 72 20 74 6f 20 61 20 6e |a pointe|r to a n|
|00000690| 65 77 20 62 6c 6f 63 6b | 20 6f 66 20 73 72 63 6c |ew block| of srcl|
|000006a0| 53 74 72 6e 00 00 00 16 | 2f 2f 20 74 68 65 20 76 |Strn....|// the v|
|000006b0| 61 72 69 65 74 79 20 27 | 74 79 70 65 27 2e 00 00 |ariety '|type'...|
|000006c0| 73 72 63 6c 53 74 72 6e | 00 00 00 25 64 69 6d 20 |srclStrn|...%dim |
|000006d0| 70 6f 73 2c 20 66 72 65 | 65 50 2c 20 70 4e 65 78 |pos, fre|eP, pNex|
|000006e0| 74 2c 20 6c 65 6e 20 61 | 73 20 69 6e 74 65 67 65 |t, len a|s intege|
|000006f0| 72 00 00 00 73 72 63 6c | 53 74 72 6e 00 00 00 12 |r...srcl|Strn....|
|00000700| 64 69 6d 20 62 6c 6b 20 | 61 73 20 69 6e 74 65 67 |dim blk |as integ|
|00000710| 65 72 00 00 73 72 63 6c | 53 74 72 6e 00 00 00 27 |er..srcl|Strn...'|
|00000720| 69 66 20 62 73 20 3d 20 | 6e 69 6c 20 74 68 65 6e |if bs = |nil then|
|00000730| 20 20 20 20 20 2f 2f 20 | 6e 6f 20 66 69 6c 65 20 | // |no file |
|00000740| 69 73 20 6f 70 65 6e 00 | 73 72 63 6c 53 74 72 6e |is open.|srclStrn|
|00000750| 00 00 00 08 72 65 74 75 | 72 6e 20 30 73 72 63 6c |....retu|rn 0srcl|
|00000760| 53 74 72 6e 00 00 00 06 | 65 6e 64 20 69 66 00 00 |Strn....|end if..|
|00000770| 73 72 63 6c 53 74 72 6e | 00 00 00 25 2f 2f 20 67 |srclStrn|...%// g|
|00000780| 65 74 20 6f 66 66 73 65 | 74 20 74 6f 20 66 72 65 |et offse|t to fre|
|00000790| 65 20 6c 69 73 74 20 66 | 6f 72 20 27 74 79 70 65 |e list f|or 'type|
|000007a0| 27 00 00 00 73 72 63 6c | 53 74 72 6e 00 00 00 23 |'...srcl|Strn...#|
|000007b0| 70 6f 73 20 3d 20 34 20 | 2a 20 28 32 20 2b 20 6e |pos = 4 |* (2 + n|
|000007c0| 75 6d 4c 69 73 74 73 29 | 20 2b 20 34 20 2a 20 74 |umLists)| + 4 * t|
|000007d0| 79 70 65 00 73 72 63 6c | 53 74 72 6e 00 00 00 11 |ype.srcl|Strn....|
|000007e0| 62 73 2e 70 6f 73 69 74 | 69 6f 6e 20 3d 20 70 6f |bs.posit|ion = po|
|000007f0| 73 00 00 00 73 72 63 6c | 53 74 72 6e 00 00 00 13 |s...srcl|Strn....|
|00000800| 66 72 65 65 50 20 3d 20 | 62 73 2e 72 65 61 64 4c |freeP = |bs.readL|
|00000810| 6f 6e 67 00 73 72 63 6c | 53 74 72 6e 00 00 00 2b |ong.srcl|Strn...+|
|00000820| 69 66 20 66 72 65 65 50 | 20 3d 20 30 20 74 68 65 |if freeP| = 0 the|
|00000830| 6e 20 20 20 20 2f 2f 20 | 6e 6f 20 66 72 65 65 20 |n // |no free |
|00000840| 6c 69 73 74 20 65 78 69 | 73 74 73 00 73 72 63 6c |list exi|sts.srcl|
|00000850| 53 74 72 6e 00 00 00 0f | 6c 65 6e 20 3d 20 62 73 |Strn....|len = bs|
|00000860| 2e 6c 65 6e 67 74 68 00 | 73 72 63 6c 53 74 72 6e |.length.|srclStrn|
|00000870| 00 00 00 32 62 6c 6b 20 | 3d 20 6c 65 6e 20 2b 20 |...2blk |= len + |
|00000880| 31 32 20 20 20 20 20 2f | 2f 20 70 74 72 20 74 6f |12 /|/ ptr to|
|00000890| 20 64 61 74 61 20 70 6f | 72 74 69 6f 6e 20 6f 66 | data po|rtion of|
|000008a0| 20 62 6c 6f 63 6b 00 00 | 73 72 63 6c 53 74 72 6e | block..|srclStrn|
|000008b0| 00 00 00 11 62 73 2e 70 | 6f 73 69 74 69 6f 6e 20 |....bs.p|osition |
|000008c0| 3d 20 6c 65 6e 00 00 00 | 73 72 63 6c 53 74 72 6e |= len...|srclStrn|
|000008d0| 00 00 00 23 62 73 2e 6c | 65 6e 67 74 68 20 3d 20 |...#bs.l|ength = |
|000008e0| 6c 65 6e 20 2b 20 31 32 | 20 2b 20 62 53 69 7a 65 |len + 12| + bSize|
|000008f0| 73 28 74 79 70 65 29 00 | 73 72 63 6c 53 74 72 6e |s(type).|srclStrn|
|00000900| 00 00 00 30 65 6c 73 65 | 20 20 20 20 20 20 20 20 |...0else| |
|00000910| 20 20 20 20 20 20 20 20 | 20 2f 2f 20 67 65 74 20 | | // get |
|00000920| 62 6c 6f 63 6b 20 66 72 | 6f 6d 20 66 72 65 65 20 |block fr|om free |
|00000930| 6c 69 73 74 73 72 63 6c | 53 74 72 6e 00 00 00 34 |listsrcl|Strn...4|
|00000940| 62 73 2e 70 6f 73 69 74 | 69 6f 6e 20 3d 20 66 72 |bs.posit|ion = fr|
|00000950| 65 65 50 20 2d 20 31 32 | 20 2f 2f 20 70 74 72 20 |eeP - 12| // ptr |
|00000960| 74 6f 20 72 65 73 74 20 | 6f 66 20 66 72 65 65 20 |to rest |of free |
|00000970| 6c 69 73 74 73 72 63 6c | 53 74 72 6e 00 00 00 13 |listsrcl|Strn....|
|00000980| 70 4e 65 78 74 20 3d 20 | 62 73 2e 72 65 61 64 4c |pNext = |bs.readL|
|00000990| 6f 6e 67 00 73 72 63 6c | 53 74 72 6e 00 00 00 30 |ong.srcl|Strn...0|
|000009a0| 62 73 2e 70 6f 73 69 74 | 69 6f 6e 20 3d 20 70 6f |bs.posit|ion = po|
|000009b0| 73 20 20 20 20 20 20 20 | 20 2f 2f 20 75 70 64 61 |s | // upda|
|000009c0| 74 65 20 74 68 65 20 66 | 72 65 65 20 6c 69 73 74 |te the f|ree list|
|000009d0| 73 72 63 6c 53 74 72 6e | 00 00 00 13 62 73 2e 77 |srclStrn|....bs.w|
|000009e0| 72 69 74 65 4c 6f 6e 67 | 28 70 4e 65 78 74 29 00 |riteLong|(pNext).|
|000009f0| 73 72 63 6c 53 74 72 6e | 00 00 00 2d 62 6c 6b 20 |srclStrn|...-blk |
|00000a00| 3d 20 66 72 65 65 50 20 | 20 20 20 20 20 20 20 20 |= freeP | |
|00000a10| 20 20 20 20 20 2f 2f 20 | 74 68 69 73 20 69 73 20 | // |this is |
|00000a20| 6f 75 72 20 62 6c 6f 63 | 6b 00 00 00 73 72 63 6c |our bloc|k...srcl|
|00000a30| 53 74 72 6e 00 00 00 32 | 62 73 2e 70 6f 73 69 74 |Strn...2|bs.posit|
|00000a40| 69 6f 6e 20 3d 20 62 6c | 6b 20 2d 20 31 32 20 20 |ion = bl|k - 12 |
|00000a50| 20 2f 2f 20 74 6f 20 69 | 6e 69 74 69 61 6c 69 7a | // to i|nitializ|
|00000a60| 65 20 70 6f 69 6e 74 65 | 72 73 00 00 73 72 63 6c |e pointe|rs..srcl|
|00000a70| 53 74 72 6e 00 00 00 06 | 65 6e 64 20 69 66 00 00 |Strn....|end if..|
|00000a80| 73 72 63 6c 53 74 72 6e | 00 00 00 0f 62 73 2e 77 |srclStrn|....bs.w|
|00000a90| 72 69 74 65 4c 6f 6e 67 | 28 30 29 00 73 72 63 6c |riteLong|(0).srcl|
|00000aa0| 53 74 72 6e 00 00 00 0f | 62 73 2e 77 72 69 74 65 |Strn....|bs.write|
|00000ab0| 4c 6f 6e 67 28 30 29 00 | 73 72 63 6c 53 74 72 6e |Long(0).|srclStrn|
|00000ac0| 00 00 00 1a 62 73 2e 77 | 72 69 74 65 4c 6f 6e 67 |....bs.w|riteLong|
|00000ad0| 28 62 53 69 7a 65 73 28 | 74 79 70 65 29 29 00 00 |(bSizes(|type))..|
|00000ae0| 73 72 63 6c 53 74 72 6e | 00 00 00 0a 72 65 74 75 |srclStrn|....retu|
|00000af0| 72 6e 20 62 6c 6b 00 00 | 73 72 63 6c 53 74 72 6e |rn blk..|srclStrn|
|00000b00| 00 00 00 0c 45 6e 64 20 | 46 75 6e 63 74 69 6f 6e |....End |Function|
|00000b10| 45 6e 64 47 49 6e 74 20 | 00 00 00 0b 45 6e 64 47 |EndGInt |....EndG|
|00000b20| 49 6e 74 20 00 00 00 0a | 4d 65 74 68 47 72 75 70 |Int ....|MethGrup|
|00000b30| 00 00 03 c4 00 00 00 0c | 6e 61 6d 65 53 74 72 6e |........|nameStrn|
|00000b40| 00 00 00 09 61 64 64 54 | 6f 4c 69 73 74 00 00 00 |....addT|oList...|
|00000b50| 70 61 72 6d 53 74 72 6e | 00 00 00 30 62 73 20 61 |parmStrn|...0bs a|
|00000b60| 73 20 62 69 6e 61 72 79 | 53 74 72 65 61 6d 2c 20 |s binary|Stream, |
|00000b70| 62 6c 6b 20 61 73 20 69 | 6e 74 65 67 65 72 2c 20 |blk as i|nteger, |
|00000b80| 6e 20 61 73 20 69 6e 74 | 65 67 65 72 72 73 6c 74 |n as int|egerrslt|
|00000b90| 53 74 72 6e 00 00 00 00 | 66 6c 61 67 49 6e 74 20 |Strn....|flagInt |
|00000ba0| 00 00 00 00 73 6f 72 63 | 47 72 75 70 00 00 03 3c |....sorc|Grup...<|
|00000bb0| 00 00 00 0d 73 74 73 72 | 49 6e 74 20 00 00 00 0e |....stsr|Int ....|
|00000bc0| 73 74 73 63 49 6e 74 20 | 00 00 00 05 6e 64 73 72 |stscInt |....ndsr|
|00000bd0| 49 6e 74 20 00 00 00 0e | 6e 64 73 63 49 6e 74 20 |Int ....|ndscInt |
|00000be0| 00 00 00 05 73 72 63 6c | 53 74 72 6e 00 00 00 3f |....srcl|Strn...?|
|00000bf0| 53 75 62 20 61 64 64 54 | 6f 4c 69 73 74 28 62 73 |Sub addT|oList(bs|
|00000c00| 20 61 73 20 62 69 6e 61 | 72 79 53 74 72 65 61 6d | as bina|ryStream|
|00000c10| 2c 20 62 6c 6b 20 61 73 | 20 69 6e 74 65 67 65 72 |, blk as| integer|
|00000c20| 2c 20 6e 20 61 73 20 69 | 6e 74 65 67 65 72 29 00 |, n as i|nteger).|
|00000c30| 73 72 63 6c 53 74 72 6e | 00 00 00 2d 2f 2f 20 4c |srclStrn|...-// L|
|00000c40| 69 6e 6b 73 20 74 68 65 | 20 62 6c 6f 63 6b 20 70 |inks the| block p|
|00000c50| 6f 69 6e 74 65 64 20 74 | 6f 20 62 79 20 27 62 6c |ointed t|o by 'bl|
|00000c60| 6b 27 20 61 74 20 74 68 | 65 00 00 00 73 72 63 6c |k' at th|e...srcl|
|00000c70| 53 74 72 6e 00 00 00 2b | 2f 2f 20 73 74 61 72 74 |Strn...+|// start|
|00000c80| 20 6f 66 20 74 68 65 20 | 64 61 74 61 20 6c 69 73 | of the |data lis|
|00000c90| 74 20 64 65 73 69 67 6e | 61 74 65 64 20 62 79 20 |t design|ated by |
|00000ca0| 27 6e 27 00 73 72 63 6c | 53 74 72 6e 00 00 00 15 |'n'.srcl|Strn....|
|00000cb0| 64 69 6d 20 70 6f 73 2c | 20 70 20 61 73 20 69 6e |dim pos,| p as in|
|00000cc0| 74 65 67 65 72 00 00 00 | 73 72 63 6c 53 74 72 6e |teger...|srclStrn|
|00000cd0| 00 00 00 2e 70 6f 73 20 | 3d 20 38 20 2b 20 34 2a |....pos |= 8 + 4*|
|00000ce0| 6e 20 20 20 20 20 20 20 | 2f 2f 20 6f 66 66 73 65 |n |// offse|
|00000cf0| 74 20 74 6f 20 73 74 61 | 72 74 20 70 6f 69 6e 74 |t to sta|rt point|
|00000d00| 65 72 00 00 73 72 63 6c | 53 74 72 6e 00 00 00 11 |er..srcl|Strn....|
|00000d10| 62 73 2e 70 6f 73 69 74 | 69 6f 6e 20 3d 20 70 6f |bs.posit|ion = po|
|00000d20| 73 00 00 00 73 72 63 6c | 53 74 72 6e 00 00 00 0f |s...srcl|Strn....|
|00000d30| 70 20 3d 20 62 73 2e 72 | 65 61 64 4c 6f 6e 67 00 |p = bs.r|eadLong.|
|00000d40| 73 72 63 6c 53 74 72 6e | 00 00 00 11 62 73 2e 70 |srclStrn|....bs.p|
|00000d50| 6f 73 69 74 69 6f 6e 20 | 3d 20 70 6f 73 00 00 00 |osition |= pos...|
|00000d60| 73 72 63 6c 53 74 72 6e | 00 00 00 30 62 73 2e 77 |srclStrn|...0bs.w|
|00000d70| 72 69 74 65 4c 6f 6e 67 | 28 62 6c 6b 29 20 20 20 |riteLong|(blk) |
|00000d80| 2f 2f 20 73 74 61 72 74 | 20 70 74 72 20 70 6f 69 |// start| ptr poi|
|00000d90| 6e 74 73 20 74 6f 20 27 | 62 6c 6b 27 73 72 63 6c |nts to '|blk'srcl|
|00000da0| 53 74 72 6e 00 00 00 16 | 62 73 2e 70 6f 73 69 74 |Strn....|bs.posit|
|00000db0| 69 6f 6e 20 3d 20 62 6c | 6b 20 2d 20 31 32 00 00 |ion = bl|k - 12..|
|00000dc0| 73 72 63 6c 53 74 72 6e | 00 00 00 33 62 73 2e 77 |srclStrn|...3bs.w|
|00000dd0| 72 69 74 65 4c 6f 6e 67 | 28 70 29 20 20 20 20 20 |riteLong|(p) |
|00000de0| 2f 2f 20 62 6c 6f 63 6b | 20 70 6f 69 6e 74 73 20 |// block| points |
|00000df0| 74 6f 20 72 65 73 74 20 | 6f 66 20 6c 69 73 74 00 |to rest |of list.|
|00000e00| 73 72 63 6c 53 74 72 6e | 00 00 00 2b 62 73 2e 77 |srclStrn|...+bs.w|
|00000e10| 72 69 74 65 4c 6f 6e 67 | 28 30 29 20 20 20 20 20 |riteLong|(0) |
|00000e20| 2f 2f 20 62 61 63 6b 20 | 70 74 72 20 6d 75 73 74 |// back |ptr must|
|00000e30| 20 62 65 20 6e 69 6c 00 | 73 72 63 6c 53 74 72 6e | be nil.|srclStrn|
|00000e40| 00 00 00 3d 69 66 20 70 | 20 3c 3e 20 30 20 74 68 |...=if p| <> 0 th|
|00000e50| 65 6e 20 20 20 20 20 20 | 2f 2f 20 6e 65 78 74 20 |en |// next |
|00000e60| 62 6c 6f 63 6b 20 6d 75 | 73 74 20 70 6f 69 6e 74 |block mu|st point|
|00000e70| 20 62 61 63 6b 20 74 6f | 20 74 68 69 73 20 6f 6e | back to| this on|
|00000e80| 65 00 00 00 73 72 63 6c | 53 74 72 6e 00 00 00 13 |e...srcl|Strn....|
|00000e90| 62 73 2e 70 6f 73 69 74 | 69 6f 6e 20 3d 20 70 20 |bs.posit|ion = p |
|00000ea0| 2d 20 38 00 73 72 63 6c | 53 74 72 6e 00 00 00 11 |- 8.srcl|Strn....|
|00000eb0| 62 73 2e 77 72 69 74 65 | 4c 6f 6e 67 28 62 6c 6b |bs.write|Long(blk|
|00000ec0| 29 00 00 00 73 72 63 6c | 53 74 72 6e 00 00 00 06 |)...srcl|Strn....|
|00000ed0| 65 6e 64 20 69 66 00 00 | 73 72 63 6c 53 74 72 6e |end if..|srclStrn|
|00000ee0| 00 00 00 07 45 6e 64 20 | 53 75 62 00 45 6e 64 47 |....End |Sub.EndG|
|00000ef0| 49 6e 74 20 00 00 00 0d | 45 6e 64 47 49 6e 74 20 |Int ....|EndGInt |
|00000f00| 00 00 00 0c 4d 65 74 68 | 47 72 75 70 00 00 04 00 |....Meth|Grup....|
|00000f10| 00 00 00 0e 6e 61 6d 65 | 53 74 72 6e 00 00 00 0e |....name|Strn....|
|00000f20| 64 65 6c 65 74 65 46 72 | 6f 6d 4c 69 73 74 00 00 |deleteFr|omList..|
|00000f30| 70 61 72 6d 53 74 72 6e | 00 00 00 30 62 73 20 61 |parmStrn|...0bs a|
|00000f40| 73 20 62 69 6e 61 72 79 | 53 74 72 65 61 6d 2c 20 |s binary|Stream, |
|00000f50| 62 6c 6b 20 61 73 20 69 | 6e 74 65 67 65 72 2c 20 |blk as i|nteger, |
|00000f60| 6e 20 61 73 20 69 6e 74 | 65 67 65 72 72 73 6c 74 |n as int|egerrslt|
|00000f70| 53 74 72 6e 00 00 00 00 | 66 6c 61 67 49 6e 74 20 |Strn....|flagInt |
|00000f80| 00 00 00 00 73 6f 72 63 | 47 72 75 70 00 00 03 74 |....sorc|Grup...t|
|00000f90| 00 00 00 0f 73 74 73 72 | 49 6e 74 20 00 00 00 11 |....stsr|Int ....|
|00000fa0| 73 74 73 63 49 6e 74 20 | 00 00 00 02 6e 64 73 72 |stscInt |....ndsr|
|00000fb0| 49 6e 74 20 00 00 00 11 | 6e 64 73 63 49 6e 74 20 |Int ....|ndscInt |
|00000fc0| 00 00 00 02 73 72 63 6c | 53 74 72 6e 00 00 00 44 |....srcl|Strn...D|
|00000fd0| 53 75 62 20 64 65 6c 65 | 74 65 46 72 6f 6d 4c 69 |Sub dele|teFromLi|
|00000fe0| 73 74 28 62 73 20 61 73 | 20 62 69 6e 61 72 79 53 |st(bs as| binaryS|
|00000ff0| 74 72 65 61 6d 2c 20 62 | 6c 6b 20 61 73 20 69 6e |tream, b|lk as in|
|00001000| 74 65 67 65 72 2c 20 6e | 20 61 73 20 69 6e 74 65 |teger, n| as inte|
|00001010| 67 65 72 29 73 72 63 6c | 53 74 72 6e 00 00 00 2e |ger)srcl|Strn....|
|00001020| 2f 2f 20 44 65 6c 65 74 | 65 73 20 74 68 65 20 62 |// Delet|es the b|
|00001030| 6c 6f 63 6b 20 27 62 6c | 6b 27 20 66 72 6f 6d 20 |lock 'bl|k' from |
|00001040| 64 61 74 61 20 6c 69 73 | 74 20 27 6e 27 2e 00 00 |data lis|t 'n'...|
|00001050| 73 72 63 6c 53 74 72 6e | 00 00 00 15 64 69 6d 20 |srclStrn|....dim |
|00001060| 70 31 2c 20 70 32 20 61 | 73 20 69 6e 74 65 67 65 |p1, p2 a|s intege|
|00001070| 72 00 00 00 73 72 63 6c | 53 74 72 6e 00 00 00 16 |r...srcl|Strn....|
|00001080| 62 73 2e 70 6f 73 69 74 | 69 6f 6e 20 3d 20 62 6c |bs.posit|ion = bl|
|00001090| 6b 20 2d 20 31 32 00 00 | 73 72 63 6c 53 74 72 6e |k - 12..|srclStrn|
|000010a0| 00 00 00 28 70 32 20 3d | 20 62 73 2e 72 65 61 64 |...(p2 =| bs.read|
|000010b0| 4c 6f 6e 67 20 20 20 2f | 2f 20 6e 65 78 74 20 62 |Long /|/ next b|
|000010c0| 6c 6f 63 6b 20 70 6f 69 | 6e 74 65 72 73 72 63 6c |lock poi|ntersrcl|
|000010d0| 53 74 72 6e 00 00 00 28 | 70 31 20 3d 20 62 73 2e |Strn...(|p1 = bs.|
|000010e0| 72 65 61 64 4c 6f 6e 67 | 20 20 20 2f 2f 20 70 72 |readLong| // pr|
|000010f0| 65 76 20 62 6c 6f 63 6b | 20 70 6f 69 6e 74 65 72 |ev block| pointer|
|00001100| 73 72 63 6c 53 74 72 6e | 00 00 00 15 62 73 2e 70 |srclStrn|....bs.p|
|00001110| 6f 73 69 74 69 6f 6e 20 | 3d 20 62 6c 6b 20 2d 31 |osition |= blk -1|
|00001120| 32 00 00 00 73 72 63 6c | 53 74 72 6e 00 00 00 34 |2...srcl|Strn...4|
|00001130| 62 73 2e 77 72 69 74 65 | 4c 6f 6e 67 28 30 29 20 |bs.write|Long(0) |
|00001140| 20 20 20 2f 2f 20 73 65 | 74 20 62 6f 74 68 20 6c | // se|t both l|
|00001150| 69 6e 6b 73 20 6f 66 20 | 62 6c 6f 63 6b 20 74 6f |inks of |block to|
|00001160| 20 6e 69 6c 73 72 63 6c | 53 74 72 6e 00 00 00 0f | nilsrcl|Strn....|
|00001170| 62 73 2e 77 72 69 74 65 | 4c 6f 6e 67 28 30 29 00 |bs.write|Long(0).|
|00001180| 73 72 63 6c 53 74 72 6e | 00 00 00 30 69 66 20 70 |srclStrn|...0if p|
|00001190| 31 20 3c 3e 20 30 20 74 | 68 65 6e 20 20 20 20 2f |1 <> 0 t|hen /|
|000011a0| 2f 20 62 6c 6f 63 6b 20 | 69 73 20 6e 6f 74 20 66 |/ block |is not f|
|000011b0| 69 72 73 74 20 69 6e 20 | 6c 69 73 74 73 72 63 6c |irst in |listsrcl|
|000011c0| 53 74 72 6e 00 00 00 15 | 62 73 2e 70 6f 73 69 74 |Strn....|bs.posit|
|000011d0| 69 6f 6e 20 3d 20 70 31 | 20 2d 20 31 32 00 00 00 |ion = p1| - 12...|
|000011e0| 73 72 63 6c 53 74 72 6e | 00 00 00 2c 65 6c 73 65 |srclStrn|...,else|
|000011f0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 2f | | /|
|00001200| 2f 20 62 6c 6f 63 6b 20 | 69 73 20 66 69 72 73 74 |/ block |is first|
|00001210| 20 69 6e 20 6c 69 73 74 | 73 72 63 6c 53 74 72 6e | in list|srclStrn|
|00001220| 00 00 00 15 62 73 2e 70 | 6f 73 69 74 69 6f 6e 20 |....bs.p|osition |
|00001230| 3d 20 38 20 2b 20 34 2a | 6e 00 00 00 73 72 63 6c |= 8 + 4*|n...srcl|
|00001240| 53 74 72 6e 00 00 00 06 | 65 6e 64 20 69 66 00 00 |Strn....|end if..|
|00001250| 73 72 63 6c 53 74 72 6e | 00 00 00 10 62 73 2e 77 |srclStrn|....bs.w|
|00001260| 72 69 74 65 4c 6f 6e 67 | 28 70 32 29 73 72 63 6c |riteLong|(p2)srcl|
|00001270| 53 74 72 6e 00 00 00 27 | 69 66 20 70 32 20 3c 3e |Strn...'|if p2 <>|
|00001280| 20 30 20 74 68 65 6e 20 | 20 20 20 2f 2f 20 6e 65 | 0 then | // ne|
|00001290| 78 74 20 62 6c 6f 63 6b | 20 65 78 69 73 74 73 00 |xt block| exists.|
|000012a0| 73 72 63 6c 53 74 72 6e | 00 00 00 14 62 73 2e 70 |srclStrn|....bs.p|
|000012b0| 6f 73 69 74 69 6f 6e 20 | 3d 20 70 32 20 2d 20 38 |osition |= p2 - 8|
|000012c0| 73 72 63 6c 53 74 72 6e | 00 00 00 10 62 73 2e 77 |srclStrn|....bs.w|
|000012d0| 72 69 74 65 4c 6f 6e 67 | 28 70 31 29 73 72 63 6c |riteLong|(p1)srcl|
|000012e0| 53 74 72 6e 00 00 00 06 | 65 6e 64 20 69 66 00 00 |Strn....|end if..|
|000012f0| 73 72 63 6c 53 74 72 6e | 00 00 00 07 45 6e 64 20 |srclStrn|....End |
|00001300| 53 75 62 00 45 6e 64 47 | 49 6e 74 20 00 00 00 0f |Sub.EndG|Int ....|
|00001310| 45 6e 64 47 49 6e 74 20 | 00 00 00 0e 4d 65 74 68 |EndGInt |....Meth|
|00001320| 47 72 75 70 00 00 04 10 | 00 00 00 10 6e 61 6d 65 |Grup....|....name|
|00001330| 53 74 72 6e 00 00 00 09 | 66 72 65 65 42 6c 6f 63 |Strn....|freeBloc|
|00001340| 6b 00 00 00 70 61 72 6d | 53 74 72 6e 00 00 00 22 |k...parm|Strn..."|
|00001350| 62 73 20 61 73 20 62 69 | 6e 61 72 79 53 74 72 65 |bs as bi|naryStre|
|00001360| 61 6d 2c 20 62 6c 6b 20 | 61 73 20 69 6e 74 65 67 |am, blk |as integ|
|00001370| 65 72 00 00 72 73 6c 74 | 53 74 72 6e 00 00 00 00 |er..rslt|Strn....|
|00001380| 66 6c 61 67 49 6e 74 20 | 00 00 00 00 73 6f 72 63 |flagInt |....sorc|
|00001390| 47 72 75 70 00 00 03 94 | 00 00 00 11 73 74 73 72 |Grup....|....stsr|
|000013a0| 49 6e 74 20 00 00 00 0c | 73 74 73 63 49 6e 74 20 |Int ....|stscInt |
|000013b0| 00 00 00 15 6e 64 73 72 | 49 6e 74 20 00 00 00 0c |....ndsr|Int ....|
|000013c0| 6e 64 73 63 49 6e 74 20 | 00 00 00 15 73 72 63 6c |ndscInt |....srcl|
|000013d0| 53 74 72 6e 00 00 00 31 | 53 75 62 20 66 72 65 65 |Strn...1|Sub free|
|000013e0| 42 6c 6f 63 6b 28 62 73 | 20 61 73 20 62 69 6e 61 |Block(bs| as bina|
|000013f0| 72 79 53 74 72 65 61 6d | 2c 20 62 6c 6b 20 61 73 |ryStream|, blk as|
|00001400| 20 69 6e 74 65 67 65 72 | 29 00 00 00 73 72 63 6c | integer|)...srcl|
|00001410| 53 74 72 6e 00 00 00 36 | 2f 2f 20 44 65 74 65 72 |Strn...6|// Deter|
|00001420| 6d 69 6e 65 73 20 74 6f | 20 77 68 69 63 68 20 66 |mines to| which f|
|00001430| 72 65 65 20 6c 69 73 74 | 20 74 68 65 20 62 6c 6f |ree list| the blo|
|00001440| 63 6b 20 70 6f 69 6e 74 | 65 64 20 74 6f 20 00 00 |ck point|ed to ..|
|00001450| 73 72 63 6c 53 74 72 6e | 00 00 00 2e 2f 2f 20 62 |srclStrn|....// b|
|00001460| 79 20 27 62 6c 6b 27 20 | 62 65 6c 6f 6e 67 73 2c |y 'blk' |belongs,|
|00001470| 20 61 6e 64 20 61 64 64 | 73 20 69 74 20 74 6f 20 | and add|s it to |
|00001480| 74 68 61 74 20 6c 69 73 | 74 2e 00 00 73 72 63 6c |that lis|t...srcl|
|00001490| 53 74 72 6e 00 00 00 1e | 64 69 6d 20 69 2c 20 73 |Strn....|dim i, s|
|000014a0| 69 7a 65 2c 20 70 6f 73 | 2c 20 70 20 61 73 20 69 |ize, pos|, p as i|
|000014b0| 6e 74 65 67 65 72 00 00 | 73 72 63 6c 53 74 72 6e |nteger..|srclStrn|
|000014c0| 00 00 00 15 62 73 2e 70 | 6f 73 69 74 69 6f 6e 20 |....bs.p|osition |
|000014d0| 3d 20 62 6c 6b 20 2d 20 | 34 00 00 00 73 72 63 6c |= blk - |4...srcl|
|000014e0| 53 74 72 6e 00 00 00 12 | 73 69 7a 65 20 3d 20 62 |Strn....|size = b|
|000014f0| 73 2e 72 65 61 64 4c 6f | 6e 67 00 00 73 72 63 6c |s.readLo|ng..srcl|
|00001500| 53 74 72 6e 00 00 00 17 | 66 6f 72 20 69 20 3d 20 |Strn....|for i = |
|00001510| 30 20 74 6f 20 6e 75 6d | 53 69 7a 65 73 2d 31 00 |0 to num|Sizes-1.|
|00001520| 73 72 63 6c 53 74 72 6e | 00 00 00 18 69 66 20 62 |srclStrn|....if b|
|00001530| 53 69 7a 65 73 28 69 29 | 20 3d 20 73 69 7a 65 20 |Sizes(i)| = size |
|00001540| 74 68 65 6e 73 72 63 6c | 53 74 72 6e 00 00 00 04 |thensrcl|Strn....|
|00001550| 65 78 69 74 73 72 63 6c | 53 74 72 6e 00 00 00 06 |exitsrcl|Strn....|
|00001560| 65 6e 64 20 69 66 00 00 | 73 72 63 6c 53 74 72 6e |end if..|srclStrn|
|00001570| 00 00 00 04 6e 65 78 74 | 73 72 63 6c 53 74 72 6e |....next|srclStrn|
|00001580| 00 00 00 1a 70 6f 73 20 | 3d 20 38 20 2b 20 34 2a |....pos |= 8 + 4*|
|00001590| 6e 75 6d 4c 69 73 74 73 | 20 2b 20 34 2a 69 00 00 |numLists| + 4*i..|
|000015a0| 73 72 63 6c 53 74 72 6e | 00 00 00 28 62 73 2e 70 |srclStrn|...(bs.p|
|000015b0| 6f 73 69 74 69 6f 6e 20 | 3d 20 70 6f 73 20 20 20 |osition |= pos |
|000015c0| 20 2f 2f 20 70 74 72 20 | 74 6f 20 66 72 65 65 20 | // ptr |to free |
|000015d0| 6c 69 73 74 73 72 63 6c | 53 74 72 6e 00 00 00 30 |listsrcl|Strn...0|
|000015e0| 70 20 3d 20 62 73 2e 72 | 65 61 64 4c 6f 6e 67 20 |p = bs.r|eadLong |
|000015f0| 20 20 20 20 20 2f 2f 20 | 66 69 72 73 74 20 62 6c | // |first bl|
|00001600| 6f 63 6b 20 6f 66 20 66 | 72 65 65 20 6c 69 73 74 |ock of f|ree list|
|00001610| 73 72 63 6c 53 74 72 6e | 00 00 00 11 62 73 2e 70 |srclStrn|....bs.p|
|00001620| 6f 73 69 74 69 6f 6e 20 | 3d 20 70 6f 73 00 00 00 |osition |= pos...|
|00001630| 73 72 63 6c 53 74 72 6e | 00 00 00 31 62 73 2e 77 |srclStrn|...1bs.w|
|00001640| 72 69 74 65 4c 6f 6e 67 | 28 62 6c 6b 29 20 20 20 |riteLong|(blk) |
|00001650| 20 2f 2f 20 61 64 64 20 | 74 68 65 20 62 6c 6f 63 | // add |the bloc|
|00001660| 6b 20 62 65 69 6e 67 20 | 66 72 65 65 64 00 00 00 |k being |freed...|
|00001670| 73 72 63 6c 53 74 72 6e | 00 00 00 16 62 73 2e 70 |srclStrn|....bs.p|
|00001680| 6f 73 69 74 69 6f 6e 20 | 3d 20 62 6c 6b 20 2d 20 |osition |= blk - |
|00001690| 31 32 00 00 73 72 63 6c | 53 74 72 6e 00 00 00 37 |12..srcl|Strn...7|
|000016a0| 62 73 2e 77 72 69 74 65 | 4c 6f 6e 67 28 70 29 20 |bs.write|Long(p) |
|000016b0| 20 20 20 20 20 2f 2f 20 | 6c 69 6e 6b 20 72 65 73 | // |link res|
|000016c0| 74 20 6f 66 20 6c 69 73 | 74 20 74 6f 20 74 68 69 |t of lis|t to thi|
|000016d0| 73 20 62 6c 6f 63 6b 00 | 73 72 63 6c 53 74 72 6e |s block.|srclStrn|
|000016e0| 00 00 00 34 2f 2f 20 6e | 6f 74 65 20 74 68 61 74 |...4// n|ote that|
|000016f0| 20 62 61 63 6b 20 70 6f | 69 6e 74 65 72 73 20 61 | back po|inters a|
|00001700| 72 65 20 6e 6f 74 20 75 | 73 65 64 20 69 6e 20 66 |re not u|sed in f|
|00001710| 72 65 65 20 6c 69 73 74 | 73 72 63 6c 53 74 72 6e |ree list|srclStrn|
|00001720| 00 00 00 07 45 6e 64 20 | 53 75 62 00 45 6e 64 47 |....End |Sub.EndG|
|00001730| 49 6e 74 20 00 00 00 11 | 45 6e 64 47 49 6e 74 20 |Int ....|EndGInt |
|00001740| 00 00 00 10 4d 65 74 68 | 47 72 75 70 00 00 02 68 |....Meth|Grup...h|
|00001750| 00 00 00 12 6e 61 6d 65 | 53 74 72 6e 00 00 00 08 |....name|Strn....|
|00001760| 6f 70 65 6e 46 69 6c 65 | 70 61 72 6d 53 74 72 6e |openFile|parmStrn|
|00001770| 00 00 00 29 66 20 61 73 | 20 66 6f 6c 64 65 72 49 |...)f as| folderI|
|00001780| 74 65 6d 2c 20 62 79 72 | 65 66 20 62 73 20 61 73 |tem, byr|ef bs as|
|00001790| 20 62 69 6e 61 72 79 53 | 74 72 65 61 6d 00 00 00 | binaryS|tream...|
|000017a0| 72 73 6c 74 53 74 72 6e | 00 00 00 07 62 6f 6f 6c |rsltStrn|....bool|
|000017b0| 65 61 6e 00 66 6c 61 67 | 49 6e 74 20 00 00 00 00 |ean.flag|Int ....|
|000017c0| 73 6f 72 63 47 72 75 70 | 00 00 01 e0 00 00 00 13 |sorcGrup|........|
|000017d0| 73 74 73 72 49 6e 74 20 | 00 00 00 03 73 74 73 63 |stsrInt |....stsc|
|000017e0| 49 6e 74 20 00 00 00 00 | 6e 64 73 72 49 6e 74 20 |Int ....|ndsrInt |
|000017f0| 00 00 00 03 6e 64 73 63 | 49 6e 74 20 00 00 00 00 |....ndsc|Int ....|
|00001800| 73 72 63 6c 53 74 72 6e | 00 00 00 47 46 75 6e 63 |srclStrn|...GFunc|
|00001810| 74 69 6f 6e 20 6f 70 65 | 6e 46 69 6c 65 28 66 20 |tion ope|nFile(f |
|00001820| 61 73 20 66 6f 6c 64 65 | 72 49 74 65 6d 2c 20 62 |as folde|rItem, b|
|00001830| 79 72 65 66 20 62 73 20 | 61 73 20 62 69 6e 61 72 |yref bs |as binar|
|00001840| 79 53 74 72 65 61 6d 29 | 20 41 73 20 62 6f 6f 6c |yStream)| As bool|
|00001850| 65 61 6e 00 73 72 63 6c | 53 74 72 6e 00 00 00 30 |ean.srcl|Strn...0|
|00001860| 2f 2f 20 4f 70 65 6e 73 | 20 61 20 62 69 6e 61 72 |// Opens| a binar|
|00001870| 79 53 74 72 65 61 6d 20 | 66 6f 72 20 72 65 61 64 |yStream |for read|
|00001880| 2f 77 72 69 74 65 20 61 | 63 63 65 73 73 20 74 6f |/write a|ccess to|
|00001890| 73 72 63 6c 53 74 72 6e | 00 00 00 2e 2f 2f 20 66 |srclStrn|....// f|
|000018a0| 6f 6c 64 65 72 49 74 65 | 6d 20 27 66 27 2e 20 52 |olderIte|m 'f'. R|
|000018b0| 65 74 75 72 6e 73 20 74 | 72 75 65 20 69 66 20 73 |eturns t|rue if s|
|000018c0| 75 63 63 65 73 73 66 75 | 6c 2e 00 00 73 72 63 6c |uccessfu|l...srcl|
|000018d0| 53 74 72 6e 00 00 00 1d | 62 73 20 3d 20 66 2e 6f |Strn....|bs = f.o|
|000018e0| 70 65 6e 41 73 42 69 6e | 61 72 79 46 69 6c 65 28 |penAsBin|aryFile(|
|000018f0| 74 72 75 65 29 00 00 00 | 73 72 63 6c 53 74 72 6e |true)...|srclStrn|
|00001900| 00 00 00 11 69 66 20 62 | 73 20 3c 3e 20 6e 69 6c |....if b|s <> nil|
|00001910| 20 74 68 65 6e 00 00 00 | 73 72 63 6c 53 74 72 6e | then...|srclStrn|
|00001920| 00 00 00 0b 72 65 74 75 | 72 6e 20 74 72 75 65 00 |....retu|rn true.|
|00001930| 73 72 63 6c 53 74 72 6e | 00 00 00 04 65 6c 73 65 |srclStrn|....else|
|00001940| 73 72 63 6c 53 74 72 6e | 00 00 00 31 72 65 74 75 |srclStrn|...1retu|
|00001950| 72 6e 20 66 61 6c 73 65 | 20 20 20 20 20 20 20 2f |rn false| /|
|00001960| 2f 20 63 61 6e 6e 6f 74 | 20 63 72 65 61 74 65 20 |/ cannot| create |
|00001970| 62 69 6e 61 72 79 20 73 | 74 72 65 61 6d 00 00 00 |binary s|tream...|
|00001980| 73 72 63 6c 53 74 72 6e | 00 00 00 06 65 6e 64 20 |srclStrn|....end |
|00001990| 69 66 00 00 73 72 63 6c | 53 74 72 6e 00 00 00 0c |if..srcl|Strn....|
|000019a0| 45 6e 64 20 46 75 6e 63 | 74 69 6f 6e 45 6e 64 47 |End Func|tionEndG|
|000019b0| 49 6e 74 20 00 00 00 13 | 45 6e 64 47 49 6e 74 20 |Int ....|EndGInt |
|000019c0| 00 00 00 12 4d 65 74 68 | 47 72 75 70 00 00 01 d0 |....Meth|Grup....|
|000019d0| 00 00 00 14 6e 61 6d 65 | 53 74 72 6e 00 00 00 0a |....name|Strn....|
|000019e0| 66 69 72 73 74 42 6c 6f | 63 6b 00 00 70 61 72 6d |firstBlo|ck..parm|
|000019f0| 53 74 72 6e 00 00 00 27 | 62 73 20 61 73 20 62 69 |Strn...'|bs as bi|
|00001a00| 6e 61 72 79 53 74 72 65 | 61 6d 2c 20 64 61 74 61 |naryStre|am, data|
|00001a10| 4c 69 73 74 20 61 73 20 | 69 6e 74 65 67 65 72 00 |List as |integer.|
|00001a20| 72 73 6c 74 53 74 72 6e | 00 00 00 07 69 6e 74 65 |rsltStrn|....inte|
|00001a30| 67 65 72 00 66 6c 61 67 | 49 6e 74 20 00 00 00 00 |ger.flag|Int ....|
|00001a40| 73 6f 72 63 47 72 75 70 | 00 00 01 48 00 00 00 15 |sorcGrup|...H....|
|00001a50| 73 74 73 72 49 6e 74 20 | 00 00 00 04 73 74 73 63 |stsrInt |....stsc|
|00001a60| 49 6e 74 20 00 00 00 09 | 6e 64 73 72 49 6e 74 20 |Int ....|ndsrInt |
|00001a70| 00 00 00 04 6e 64 73 63 | 49 6e 74 20 00 00 00 09 |....ndsc|Int ....|
|00001a80| 73 72 63 6c 53 74 72 6e | 00 00 00 47 46 75 6e 63 |srclStrn|...GFunc|
|00001a90| 74 69 6f 6e 20 66 69 72 | 73 74 42 6c 6f 63 6b 28 |tion fir|stBlock(|
|00001aa0| 62 73 20 61 73 20 62 69 | 6e 61 72 79 53 74 72 65 |bs as bi|naryStre|
|00001ab0| 61 6d 2c 20 64 61 74 61 | 4c 69 73 74 20 61 73 20 |am, data|List as |
|00001ac0| 69 6e 74 65 67 65 72 29 | 20 41 73 20 69 6e 74 65 |integer)| As inte|
|00001ad0| 67 65 72 00 73 72 63 6c | 53 74 72 6e 00 00 00 35 |ger.srcl|Strn...5|
|00001ae0| 2f 2f 20 52 65 74 75 72 | 6e 73 20 61 20 70 6f 69 |// Retur|ns a poi|
|00001af0| 6e 74 65 72 20 74 6f 20 | 74 68 65 20 66 69 72 73 |nter to |the firs|
|00001b00| 74 20 62 6c 6f 63 6b 20 | 6f 66 20 27 64 61 74 61 |t block |of 'data|
|00001b10| 4c 69 73 74 27 00 00 00 | 73 72 63 6c 53 74 72 6e |List'...|srclStrn|
|00001b20| 00 00 00 0e 2f 2f 20 28 | 30 2c 20 31 20 2e 2e 2e |....// (|0, 1 ...|
|00001b30| 29 2e 00 00 73 72 63 6c | 53 74 72 6e 00 00 00 1c |)...srcl|Strn....|
|00001b40| 62 73 2e 70 6f 73 69 74 | 69 6f 6e 20 3d 20 38 20 |bs.posit|ion = 8 |
|00001b50| 2b 20 34 2a 64 61 74 61 | 4c 69 73 74 73 72 63 6c |+ 4*data|Listsrcl|
|00001b60| 53 74 72 6e 00 00 00 12 | 72 65 74 75 72 6e 20 62 |Strn....|return b|
|00001b70| 73 2e 72 65 61 64 4c 6f | 6e 67 00 00 73 72 63 6c |s.readLo|ng..srcl|
|00001b80| 53 74 72 6e 00 00 00 0c | 45 6e 64 20 46 75 6e 63 |Strn....|End Func|
|00001b90| 74 69 6f 6e 45 6e 64 47 | 49 6e 74 20 00 00 00 15 |tionEndG|Int ....|
|00001ba0| 45 6e 64 47 49 6e 74 20 | 00 00 00 14 4d 65 74 68 |EndGInt |....Meth|
|00001bb0| 47 72 75 70 00 00 02 40 | 00 00 00 16 6e 61 6d 65 |Grup...@|....name|
|00001bc0| 53 74 72 6e 00 00 00 09 | 6e 65 78 74 42 6c 6f 63 |Strn....|nextBloc|
|00001bd0| 6b 00 00 00 70 61 72 6d | 53 74 72 6e 00 00 00 22 |k...parm|Strn..."|
|00001be0| 62 73 20 61 73 20 62 69 | 6e 61 72 79 53 74 72 65 |bs as bi|naryStre|
|00001bf0| 61 6d 2c 20 62 6c 6b 20 | 61 73 20 69 6e 74 65 67 |am, blk |as integ|
|00001c00| 65 72 00 00 72 73 6c 74 | 53 74 72 6e 00 00 00 07 |er..rslt|Strn....|
|00001c10| 69 6e 74 65 67 65 72 00 | 66 6c 61 67 49 6e 74 20 |integer.|flagInt |
|00001c20| 00 00 00 00 73 6f 72 63 | 47 72 75 70 00 00 01 bc |....sorc|Grup....|
|00001c30| 00 00 00 17 73 74 73 72 | 49 6e 74 20 00 00 00 04 |....stsr|Int ....|
|00001c40| 73 74 73 63 49 6e 74 20 | 00 00 00 09 6e 64 73 72 |stscInt |....ndsr|
|00001c50| 49 6e 74 20 00 00 00 04 | 6e 64 73 63 49 6e 74 20 |Int ....|ndscInt |
|00001c60| 00 00 00 09 73 72 63 6c | 53 74 72 6e 00 00 00 41 |....srcl|Strn...A|
|00001c70| 46 75 6e 63 74 69 6f 6e | 20 6e 65 78 74 42 6c 6f |Function| nextBlo|
|00001c80| 63 6b 28 62 73 20 61 73 | 20 62 69 6e 61 72 79 53 |ck(bs as| binaryS|
|00001c90| 74 72 65 61 6d 2c 20 62 | 6c 6b 20 61 73 20 69 6e |tream, b|lk as in|
|00001ca0| 74 65 67 65 72 29 20 41 | 73 20 69 6e 74 65 67 65 |teger) A|s intege|
|00001cb0| 72 00 00 00 73 72 63 6c | 53 74 72 6e 00 00 00 2b |r...srcl|Strn...+|
|00001cc0| 2f 2f 20 47 69 76 65 6e | 20 27 62 6c 6b 27 20 77 |// Given| 'blk' w|
|00001cd0| 68 69 63 68 20 70 6f 69 | 6e 74 73 20 74 6f 20 61 |hich poi|nts to a|
|00001ce0| 20 62 6c 6f 63 6b 2c 20 | 74 68 65 00 73 72 63 6c | block, |the.srcl|
|00001cf0| 53 74 72 6e 00 00 00 2f | 2f 2f 20 66 75 6e 63 74 |Strn.../|// funct|
|00001d00| 69 6f 6e 20 72 65 74 75 | 72 6e 73 20 61 20 70 6f |ion retu|rns a po|
|00001d10| 69 6e 74 65 72 20 74 6f | 20 74 68 65 20 6e 65 78 |inter to| the nex|
|00001d20| 74 20 62 6c 6f 63 6b 00 | 73 72 63 6c 53 74 72 6e |t block.|srclStrn|
|00001d30| 00 00 00 30 2f 2f 20 69 | 6e 20 74 68 65 20 6c 69 |...0// i|n the li|
|00001d40| 73 74 2c 20 6f 72 20 30 | 20 69 66 20 27 62 6c 6b |st, or 0| if 'blk|
|00001d50| 27 20 70 6f 69 6e 74 73 | 20 74 6f 20 74 68 65 20 |' points| to the |
|00001d60| 6c 61 73 74 73 72 63 6c | 53 74 72 6e 00 00 00 09 |lastsrcl|Strn....|
|00001d70| 2f 2f 20 62 6c 6f 63 6b | 2e 00 00 00 73 72 63 6c |// block|....srcl|
|00001d80| 53 74 72 6e 00 00 00 2b | 62 73 2e 70 6f 73 69 74 |Strn...+|bs.posit|
|00001d90| 69 6f 6e 20 3d 20 62 6c | 6b 20 2d 20 31 32 20 20 |ion = bl|k - 12 |
|00001da0| 20 20 2f 2f 20 27 6e 65 | 78 74 27 20 70 6f 69 6e | // 'ne|xt' poin|
|00001db0| 74 65 72 00 73 72 63 6c | 53 74 72 6e 00 00 00 12 |ter.srcl|Strn....|
|00001dc0| 72 65 74 75 72 6e 20 62 | 73 2e 72 65 61 64 4c 6f |return b|s.readLo|
|00001dd0| 6e 67 00 00 73 72 63 6c | 53 74 72 6e 00 00 00 0c |ng..srcl|Strn....|
|00001de0| 45 6e 64 20 46 75 6e 63 | 74 69 6f 6e 45 6e 64 47 |End Func|tionEndG|
|00001df0| 49 6e 74 20 00 00 00 17 | 45 6e 64 47 49 6e 74 20 |Int ....|EndGInt |
|00001e00| 00 00 00 16 4d 65 74 68 | 47 72 75 70 00 00 02 4c |....Meth|Grup...L|
|00001e10| 00 00 00 18 6e 61 6d 65 | 53 74 72 6e 00 00 00 09 |....name|Strn....|
|00001e20| 70 72 65 76 42 6c 6f 63 | 6b 00 00 00 70 61 72 6d |prevBloc|k...parm|
|00001e30| 53 74 72 6e 00 00 00 22 | 62 73 20 61 73 20 62 69 |Strn..."|bs as bi|
|00001e40| 6e 61 72 79 53 74 72 65 | 61 6d 2c 20 62 6c 6b 20 |naryStre|am, blk |
|00001e50| 61 73 20 69 6e 74 65 67 | 65 72 00 00 72 73 6c 74 |as integ|er..rslt|
|00001e60| 53 74 72 6e 00 00 00 07 | 69 6e 74 65 67 65 72 00 |Strn....|integer.|
|00001e70| 66 6c 61 67 49 6e 74 20 | 00 00 00 00 73 6f 72 63 |flagInt |....sorc|
|00001e80| 47 72 75 70 00 00 01 c8 | 00 00 00 19 73 74 73 72 |Grup....|....stsr|
|00001e90| 49 6e 74 20 00 00 00 05 | 73 74 73 63 49 6e 74 20 |Int ....|stscInt |
|00001ea0| 00 00 00 1f 6e 64 73 72 | 49 6e 74 20 00 00 00 05 |....ndsr|Int ....|
|00001eb0| 6e 64 73 63 49 6e 74 20 | 00 00 00 1f 73 72 63 6c |ndscInt |....srcl|
|00001ec0| 53 74 72 6e 00 00 00 41 | 46 75 6e 63 74 69 6f 6e |Strn...A|Function|
|00001ed0| 20 70 72 65 76 42 6c 6f | 63 6b 28 62 73 20 61 73 | prevBlo|ck(bs as|
|00001ee0| 20 62 69 6e 61 72 79 53 | 74 72 65 61 6d 2c 20 62 | binaryS|tream, b|
|00001ef0| 6c 6b 20 61 73 20 69 6e | 74 65 67 65 72 29 20 41 |lk as in|teger) A|
|00001f00| 73 20 69 6e 74 65 67 65 | 72 00 00 00 73 72 63 6c |s intege|r...srcl|
|00001f10| 53 74 72 6e 00 00 00 2b | 2f 2f 20 47 69 76 65 6e |Strn...+|// Given|
|00001f20| 20 27 62 6c 6b 27 20 77 | 68 69 63 68 20 70 6f 69 | 'blk' w|hich poi|
|00001f30| 6e 74 73 20 74 6f 20 61 | 20 62 6c 6f 63 6b 2c 20 |nts to a| block, |
|00001f40| 74 68 65 00 73 72 63 6c | 53 74 72 6e 00 00 00 33 |the.srcl|Strn...3|
|00001f50| 2f 2f 20 66 75 6e 63 74 | 69 6f 6e 20 72 65 74 75 |// funct|ion retu|
|00001f60| 72 6e 73 20 61 20 70 6f | 69 6e 74 65 72 20 74 6f |rns a po|inter to|
|00001f70| 20 74 68 65 20 70 72 65 | 76 69 6f 75 73 20 62 6c | the pre|vious bl|
|00001f80| 6f 63 6b 00 73 72 63 6c | 53 74 72 6e 00 00 00 31 |ock.srcl|Strn...1|
|00001f90| 2f 2f 20 69 6e 20 74 68 | 65 20 6c 69 73 74 2c 20 |// in th|e list, |
|00001fa0| 6f 72 20 30 20 69 66 20 | 27 62 6c 6b 27 20 70 6f |or 0 if |'blk' po|
|00001fb0| 69 6e 74 73 20 74 6f 20 | 74 68 65 20 66 69 72 73 |ints to |the firs|
|00001fc0| 74 00 00 00 73 72 63 6c | 53 74 72 6e 00 00 00 09 |t...srcl|Strn....|
|00001fd0| 2f 2f 20 62 6c 6f 63 6b | 2e 00 00 00 73 72 63 6c |// block|....srcl|
|00001fe0| 53 74 72 6e 00 00 00 2f | 62 73 2e 70 6f 73 69 74 |Strn.../|bs.posit|
|00001ff0| 69 6f 6e 20 3d 20 62 6c | 6b 20 2d 20 38 20 20 20 |ion = bl|k - 8 |
|00002000| 20 20 2f 2f 20 27 70 72 | 65 76 69 6f 75 73 27 20 | // 'pr|evious' |
|00002010| 70 6f 69 6e 74 65 72 00 | 73 72 63 6c 53 74 72 6e |pointer.|srclStrn|
|00002020| 00 00 00 12 72 65 74 75 | 72 6e 20 62 73 2e 72 65 |....retu|rn bs.re|
|00002030| 61 64 4c 6f 6e 67 00 00 | 73 72 63 6c 53 74 72 6e |adLong..|srclStrn|
|00002040| 00 00 00 0c 45 6e 64 20 | 46 75 6e 63 74 69 6f 6e |....End |Function|
|00002050| 45 6e 64 47 49 6e 74 20 | 00 00 00 19 45 6e 64 47 |EndGInt |....EndG|
|00002060| 49 6e 74 20 00 00 00 18 | 4d 65 74 68 47 72 75 70 |Int ....|MethGrup|
|00002070| 00 00 02 4c 00 00 00 1a | 6e 61 6d 65 53 74 72 6e |...L....|nameStrn|
|00002080| 00 00 00 08 66 72 65 65 | 4c 69 73 74 70 61 72 6d |....free|Listparm|
|00002090| 53 74 72 6e 00 00 00 22 | 62 73 20 61 73 20 62 69 |Strn..."|bs as bi|
|000020a0| 6e 61 72 79 53 74 72 65 | 61 6d 2c 20 62 6c 6b 20 |naryStre|am, blk |
|000020b0| 61 73 20 69 6e 74 65 67 | 65 72 00 00 72 73 6c 74 |as integ|er..rslt|
|000020c0| 53 74 72 6e 00 00 00 00 | 66 6c 61 67 49 6e 74 20 |Strn....|flagInt |
|000020d0| 00 00 00 00 73 6f 72 63 | 47 72 75 70 00 00 01 d4 |....sorc|Grup....|
|000020e0| 00 00 00 1b 73 74 73 72 | 49 6e 74 20 00 00 00 04 |....stsr|Int ....|
|000020f0| 73 74 73 63 49 6e 74 20 | 00 00 00 0a 6e 64 73 72 |stscInt |....ndsr|
|00002100| 49 6e 74 20 00 00 00 04 | 6e 64 73 63 49 6e 74 20 |Int ....|ndscInt |
|00002110| 00 00 00 0a 73 72 63 6c | 53 74 72 6e 00 00 00 30 |....srcl|Strn...0|
|00002120| 53 75 62 20 66 72 65 65 | 4c 69 73 74 28 62 73 20 |Sub free|List(bs |
|00002130| 61 73 20 62 69 6e 61 72 | 79 53 74 72 65 61 6d 2c |as binar|yStream,|
|00002140| 20 62 6c 6b 20 61 73 20 | 69 6e 74 65 67 65 72 29 | blk as |integer)|
|00002150| 73 72 63 6c 53 74 72 6e | 00 00 00 3a 2f 2f 20 52 |srclStrn|...:// R|
|00002160| 65 74 75 72 6e 73 20 74 | 6f 20 66 72 65 65 20 73 |eturns t|o free s|
|00002170| 74 6f 72 61 67 65 20 74 | 68 65 20 6c 69 73 74 20 |torage t|he list |
|00002180| 70 6f 69 6e 74 65 64 20 | 74 6f 20 62 79 20 27 62 |pointed |to by 'b|
|00002190| 6c 6b 27 20 69 6e 00 00 | 73 72 63 6c 53 74 72 6e |lk' in..|srclStrn|
|000021a0| 00 00 00 3a 2f 2f 20 74 | 68 65 20 73 74 72 65 61 |...:// t|he strea|
|000021b0| 6d 20 27 62 73 27 2e 20 | 49 66 20 74 68 65 20 6c |m 'bs'. |If the l|
|000021c0| 69 73 74 20 69 73 20 65 | 6d 70 74 79 2c 20 6e 6f |ist is e|mpty, no|
|000021d0| 74 68 69 6e 67 20 68 61 | 70 70 65 6e 73 2e 00 00 |thing ha|ppens...|
|000021e0| 73 72 63 6c 53 74 72 6e | 00 00 00 16 64 69 6d 20 |srclStrn|....dim |
|000021f0| 6c 69 73 74 2c 20 70 20 | 61 73 20 69 6e 74 65 67 |list, p |as integ|
|00002200| 65 72 00 00 73 72 63 6c | 53 74 72 6e 00 00 00 0a |er..srcl|Strn....|
|00002210| 6c 69 73 74 20 3d 20 62 | 6c 6b 00 00 73 72 63 6c |list = b|lk..srcl|
|00002220| 53 74 72 6e 00 00 00 0f | 77 68 69 6c 65 20 6c 69 |Strn....|while li|
|00002230| 73 74 20 3c 3e 20 30 00 | 73 72 63 6c 53 74 72 6e |st <> 0.|srclStrn|
|00002240| 00 00 00 08 70 20 3d 20 | 6c 69 73 74 73 72 63 6c |....p = |listsrcl|
|00002250| 53 74 72 6e 00 00 00 1a | 6c 69 73 74 20 3d 20 6e |Strn....|list = n|
|00002260| 65 78 74 42 6c 6f 63 6b | 28 62 73 2c 20 6c 69 73 |extBlock|(bs, lis|
|00002270| 74 29 00 00 73 72 63 6c | 53 74 72 6e 00 00 00 10 |t)..srcl|Strn....|
|00002280| 66 72 65 65 42 6c 6f 63 | 6b 28 62 73 2c 20 70 29 |freeBloc|k(bs, p)|
|00002290| 73 72 63 6c 53 74 72 6e | 00 00 00 04 77 65 6e 64 |srclStrn|....wend|
|000022a0| 73 72 63 6c 53 74 72 6e | 00 00 00 07 45 6e 64 20 |srclStrn|....End |
|000022b0| 53 75 62 00 45 6e 64 47 | 49 6e 74 20 00 00 00 1b |Sub.EndG|Int ....|
|000022c0| 45 6e 64 47 49 6e 74 20 | 00 00 00 1a 4d 65 74 68 |EndGInt |....Meth|
|000022d0| 47 72 75 70 00 00 05 20 | 00 00 00 1c 6e 61 6d 65 |Grup... |....name|
|000022e0| 53 74 72 6e 00 00 00 0b | 6f 70 65 6e 4e 65 77 46 |Strn....|openNewF|
|000022f0| 69 6c 65 00 70 61 72 6d | 53 74 72 6e 00 00 00 29 |ile.parm|Strn...)|
|00002300| 66 20 61 73 20 66 6f 6c | 64 65 72 49 74 65 6d 2c |f as fol|derItem,|
|00002310| 20 62 79 72 65 66 20 62 | 73 20 61 73 20 62 69 6e | byref b|s as bin|
|00002320| 61 72 79 53 74 72 65 61 | 6d 00 00 00 72 73 6c 74 |aryStrea|m...rslt|
|00002330| 53 74 72 6e 00 00 00 07 | 62 6f 6f 6c 65 61 6e 00 |Strn....|boolean.|
|00002340| 66 6c 61 67 49 6e 74 20 | 00 00 00 00 73 6f 72 63 |flagInt |....sorc|
|00002350| 47 72 75 70 00 00 04 94 | 00 00 00 1d 73 74 73 72 |Grup....|....stsr|
|00002360| 49 6e 74 20 00 00 00 03 | 73 74 73 63 49 6e 74 20 |Int ....|stscInt |
|00002370| 00 00 00 13 6e 64 73 72 | 49 6e 74 20 00 00 00 03 |....ndsr|Int ....|
|00002380| 6e 64 73 63 49 6e 74 20 | 00 00 00 13 73 72 63 6c |ndscInt |....srcl|
|00002390| 53 74 72 6e 00 00 00 4a | 46 75 6e 63 74 69 6f 6e |Strn...J|Function|
|000023a0| 20 6f 70 65 6e 4e 65 77 | 46 69 6c 65 28 66 20 61 | openNew|File(f a|
|000023b0| 73 20 66 6f 6c 64 65 72 | 49 74 65 6d 2c 20 62 79 |s folder|Item, by|
|000023c0| 72 65 66 20 62 73 20 61 | 73 20 62 69 6e 61 72 79 |ref bs a|s binary|
|000023d0| 53 74 72 65 61 6d 29 20 | 41 73 20 62 6f 6f 6c 65 |Stream) |As boole|
|000023e0| 61 6e 00 00 73 72 63 6c | 53 74 72 6e 00 00 00 3b |an..srcl|Strn...;|
|000023f0| 2f 2f 20 43 72 65 61 74 | 65 73 20 61 20 66 69 6c |// Creat|es a fil|
|00002400| 65 20 61 73 20 66 6f 6c | 64 65 72 49 74 65 6d 20 |e as fol|derItem |
|00002410| 27 66 27 20 66 6f 72 20 | 72 65 61 64 2f 77 72 69 |'f' for |read/wri|
|00002420| 74 65 20 61 63 63 65 73 | 73 2e 20 00 73 72 63 6c |te acces|s. .srcl|
|00002430| 53 74 72 6e 00 00 00 3e | 2f 2f 20 52 65 74 75 72 |Strn...>|// Retur|
|00002440| 6e 73 20 74 72 75 65 20 | 69 66 20 74 68 65 20 66 |ns true |if the f|
|00002450| 69 6c 65 20 63 61 6e 20 | 62 65 20 6f 70 65 6e 65 |ile can |be opene|
|00002460| 64 20 61 73 20 61 20 62 | 69 6e 61 72 79 20 73 74 |d as a b|inary st|
|00002470| 72 65 61 6d 2c 20 00 00 | 73 72 63 6c 53 74 72 6e |ream, ..|srclStrn|
|00002480| 00 00 00 13 2f 2f 20 6f | 74 68 65 72 77 69 73 65 |....// o|therwise|
|00002490| 20 66 61 6c 73 65 2e 00 | 73 72 63 6c 53 74 72 6e | false..|srclStrn|
|000024a0| 00 00 00 10 64 69 6d 20 | 69 20 61 73 20 69 6e 74 |....dim |i as int|
|000024b0| 65 67 65 72 73 72 63 6c | 53 74 72 6e 00 00 00 10 |egersrcl|Strn....|
|000024c0| 69 66 20 66 2e 65 78 69 | 73 74 73 20 74 68 65 6e |if f.exi|sts then|
|000024d0| 73 72 63 6c 53 74 72 6e | 00 00 00 1d 62 73 20 3d |srclStrn|....bs =|
|000024e0| 20 66 2e 6f 70 65 6e 41 | 73 42 69 6e 61 72 79 46 | f.openA|sBinaryF|
|000024f0| 69 6c 65 28 74 72 75 65 | 29 00 00 00 73 72 63 6c |ile(true|)...srcl|
|00002500| 53 74 72 6e 00 00 00 3b | 62 73 2e 63 6c 6f 73 65 |Strn...;|bs.close|
|00002510| 20 20 20 2f 2f 20 72 61 | 69 73 65 20 65 78 63 65 | // ra|ise exce|
|00002520| 70 74 69 6f 6e 20 69 66 | 20 66 61 69 6c 65 64 2c |ption if| failed,|
|00002530| 20 63 6c 6f 73 65 20 69 | 66 20 73 75 63 63 65 65 | close i|f succee|
|00002540| 64 65 64 00 73 72 63 6c | 53 74 72 6e 00 00 00 06 |ded.srcl|Strn....|
|00002550| 65 6e 64 20 69 66 00 00 | 73 72 63 6c 53 74 72 6e |end if..|srclStrn|
|00002560| 00 00 00 24 62 73 20 3d | 20 66 2e 63 72 65 61 74 |...$bs =| f.creat|
|00002570| 65 42 69 6e 61 72 79 46 | 69 6c 65 28 22 68 79 70 |eBinaryF|ile("hyp|
|00002580| 65 72 46 69 6c 65 22 29 | 73 72 63 6c 53 74 72 6e |erFile")|srclStrn|
|00002590| 00 00 00 11 69 66 20 62 | 73 20 3c 3e 20 6e 69 6c |....if b|s <> nil|
|000025a0| 20 74 68 65 6e 00 00 00 | 73 72 63 6c 53 74 72 6e | then...|srclStrn|
|000025b0| 00 00 00 25 62 73 2e 77 | 72 69 74 65 28 22 74 65 |...%bs.w|rite("te|
|000025c0| 78 74 22 29 20 20 20 2f | 2f 20 66 69 6c 65 20 74 |xt") /|/ file t|
|000025d0| 79 70 65 20 63 6f 64 65 | 20 00 00 00 73 72 63 6c |ype code| ...srcl|
|000025e0| 53 74 72 6e 00 00 00 17 | 62 73 2e 77 72 69 74 65 |Strn....|bs.write|
|000025f0| 53 68 6f 72 74 28 6e 75 | 6d 4c 69 73 74 73 29 00 |Short(nu|mLists).|
|00002600| 73 72 63 6c 53 74 72 6e | 00 00 00 17 62 73 2e 77 |srclStrn|....bs.w|
|00002610| 72 69 74 65 53 68 6f 72 | 74 28 6e 75 6d 53 69 7a |riteShor|t(numSiz|
|00002620| 65 73 29 00 73 72 63 6c | 53 74 72 6e 00 00 00 15 |es).srcl|Strn....|
|00002630| 66 6f 72 20 69 20 3d 20 | 31 20 74 6f 20 6e 75 6d |for i = |1 to num|
|00002640| 4c 69 73 74 73 00 00 00 | 73 72 63 6c 53 74 72 6e |Lists...|srclStrn|
|00002650| 00 00 00 26 62 73 2e 77 | 72 69 74 65 4c 6f 6e 67 |...&bs.w|riteLong|
|00002660| 28 30 29 20 20 2f 2f 20 | 64 61 74 61 20 6c 69 73 |(0) // |data lis|
|00002670| 74 20 70 6f 69 6e 74 65 | 72 73 00 00 73 72 63 6c |t pointe|rs..srcl|
|00002680| 53 74 72 6e 00 00 00 04 | 6e 65 78 74 73 72 63 6c |Strn....|nextsrcl|
|00002690| 53 74 72 6e 00 00 00 15 | 66 6f 72 20 69 20 3d 20 |Strn....|for i = |
|000026a0| 31 20 74 6f 20 6e 75 6d | 53 69 7a 65 73 00 00 00 |1 to num|Sizes...|
|000026b0| 73 72 63 6c 53 74 72 6e | 00 00 00 26 62 73 2e 77 |srclStrn|...&bs.w|
|000026c0| 72 69 74 65 4c 6f 6e 67 | 28 30 29 20 20 2f 2f 20 |riteLong|(0) // |
|000026d0| 66 72 65 65 20 6c 69 73 | 74 20 70 6f 69 6e 74 65 |free lis|t pointe|
|000026e0| 72 73 00 00 73 72 63 6c | 53 74 72 6e 00 00 00 04 |rs..srcl|Strn....|
|000026f0| 6e 65 78 74 73 72 63 6c | 53 74 72 6e 00 00 00 0b |nextsrcl|Strn....|
|00002700| 72 65 74 75 72 6e 20 74 | 72 75 65 00 73 72 63 6c |return t|rue.srcl|
|00002710| 53 74 72 6e 00 00 00 04 | 65 6c 73 65 73 72 63 6c |Strn....|elsesrcl|
|00002720| 53 74 72 6e 00 00 00 0c | 72 65 74 75 72 6e 20 66 |Strn....|return f|
|00002730| 61 6c 73 65 73 72 63 6c | 53 74 72 6e 00 00 00 06 |alsesrcl|Strn....|
|00002740| 65 6e 64 20 69 66 00 00 | 73 72 63 6c 53 74 72 6e |end if..|srclStrn|
|00002750| 00 00 00 38 65 78 63 65 | 70 74 69 6f 6e 20 20 20 |...8exce|ption |
|00002760| 20 20 20 20 20 20 20 20 | 20 20 20 2f 2f 20 73 65 | | // se|
|00002770| 65 20 4d 61 74 74 20 4e | 65 75 62 75 72 67 27 73 |e Matt N|euburg's|
|00002780| 20 62 6f 6f 6b 20 70 2e | 20 34 34 37 73 72 63 6c | book p.| 447srcl|
|00002790| 53 74 72 6e 00 00 00 3a | 2f 2f 20 61 70 70 2e 61 |Strn...:|// app.a|
|000027a0| 6c 65 72 74 28 22 41 74 | 74 65 6d 70 74 20 74 6f |lert("At|tempt to|
|000027b0| 20 6f 70 65 6e 20 66 69 | 6c 65 20 22 20 2b 20 66 | open fi|le " + f|
|000027c0| 2e 6e 61 6d 65 20 2b 20 | 22 20 66 61 69 6c 65 64 |.name + |" failed|
|000027d0| 22 29 00 00 73 72 63 6c | 53 74 72 6e 00 00 00 0c |")..srcl|Strn....|
|000027e0| 45 6e 64 20 46 75 6e 63 | 74 69 6f 6e 45 6e 64 47 |End Func|tionEndG|
|000027f0| 49 6e 74 20 00 00 00 1d | 45 6e 64 47 49 6e 74 20 |Int ....|EndGInt |
|00002800| 00 00 00 1c 4d 65 74 68 | 47 72 75 70 00 00 03 b0 |....Meth|Grup....|
|00002810| 00 00 00 1e 6e 61 6d 65 | 53 74 72 6e 00 00 00 0a |....name|Strn....|
|00002820| 69 6e 73 65 72 74 50 6f | 73 74 00 00 70 61 72 6d |insertPo|st..parm|
|00002830| 53 74 72 6e 00 00 00 30 | 62 73 20 61 73 20 62 69 |Strn...0|bs as bi|
|00002840| 6e 61 72 79 53 74 72 65 | 61 6d 2c 20 62 6c 6b 20 |naryStre|am, blk |
|00002850| 61 73 20 69 6e 74 65 67 | 65 72 2c 20 70 20 61 73 |as integ|er, p as|
|00002860| 20 69 6e 74 65 67 65 72 | 72 73 6c 74 53 74 72 6e | integer|rsltStrn|
|00002870| 00 00 00 00 66 6c 61 67 | 49 6e 74 20 00 00 00 00 |....flag|Int ....|
|00002880| 73 6f 72 63 47 72 75 70 | 00 00 03 28 00 00 00 1f |sorcGrup|...(....|
|00002890| 73 74 73 72 49 6e 74 20 | 00 00 00 01 73 74 73 63 |stsrInt |....stsc|
|000028a0| 49 6e 74 20 00 00 00 12 | 6e 64 73 72 49 6e 74 20 |Int ....|ndsrInt |
|000028b0| 00 00 00 01 6e 64 73 63 | 49 6e 74 20 00 00 00 12 |....ndsc|Int ....|
|000028c0| 73 72 63 6c 53 74 72 6e | 00 00 00 40 53 75 62 20 |srclStrn|...@Sub |
|000028d0| 69 6e 73 65 72 74 50 6f | 73 74 28 62 73 20 61 73 |insertPo|st(bs as|
|000028e0| 20 62 69 6e 61 72 79 53 | 74 72 65 61 6d 2c 20 62 | binaryS|tream, b|
|000028f0| 6c 6b 20 61 73 20 69 6e | 74 65 67 65 72 2c 20 70 |lk as in|teger, p|
|00002900| 20 61 73 20 69 6e 74 65 | 67 65 72 29 73 72 63 6c | as inte|ger)srcl|
|00002910| 53 74 72 6e 00 00 00 38 | 2f 2f 20 49 6e 73 65 72 |Strn...8|// Inser|
|00002920| 74 73 20 74 68 65 20 62 | 6c 6f 63 6b 20 70 6f 69 |ts the b|lock poi|
|00002930| 6e 74 65 64 20 74 6f 20 | 62 79 20 27 62 6c 6b 27 |nted to |by 'blk'|
|00002940| 20 61 66 74 65 72 20 74 | 68 65 20 62 6c 6f 63 6b | after t|he block|
|00002950| 73 72 63 6c 53 74 72 6e | 00 00 00 15 2f 2f 20 70 |srclStrn|....// p|
|00002960| 6f 69 6e 74 65 64 20 74 | 6f 20 62 79 20 27 70 27 |ointed t|o by 'p'|
|00002970| 2e 00 00 00 73 72 63 6c | 53 74 72 6e 00 00 00 10 |....srcl|Strn....|
|00002980| 64 69 6d 20 71 20 61 73 | 20 69 6e 74 65 67 65 72 |dim q as| integer|
|00002990| 73 72 63 6c 53 74 72 6e | 00 00 00 14 62 73 2e 70 |srclStrn|....bs.p|
|000029a0| 6f 73 69 74 69 6f 6e 20 | 3d 20 70 20 2d 20 31 32 |osition |= p - 12|
|000029b0| 73 72 63 6c 53 74 72 6e | 00 00 00 36 71 20 3d 20 |srclStrn|...6q = |
|000029c0| 62 73 2e 72 65 61 64 4c | 6f 6e 67 20 20 20 20 20 |bs.readL|ong |
|000029d0| 20 20 20 20 2f 2f 20 27 | 71 27 20 69 73 20 6e 65 | // '|q' is ne|
|000029e0| 78 74 20 62 6c 6f 63 6b | 20 61 66 74 65 72 20 27 |xt block| after '|
|000029f0| 70 27 00 00 73 72 63 6c | 53 74 72 6e 00 00 00 14 |p'..srcl|Strn....|
|00002a00| 62 73 2e 70 6f 73 69 74 | 69 6f 6e 20 3d 20 70 20 |bs.posit|ion = p |
|00002a10| 2d 20 31 32 73 72 63 6c | 53 74 72 6e 00 00 00 2e |- 12srcl|Strn....|
|00002a20| 62 73 2e 77 72 69 74 65 | 4c 6f 6e 67 28 62 6c 6b |bs.write|Long(blk|
|00002a30| 29 20 20 20 20 20 20 20 | 2f 2f 20 27 70 27 20 70 |) |// 'p' p|
|00002a40| 6f 69 6e 74 73 20 74 6f | 20 27 62 6c 6b 27 00 00 |oints to| 'blk'..|
|00002a50| 73 72 63 6c 53 74 72 6e | 00 00 00 16 62 73 2e 70 |srclStrn|....bs.p|
|00002a60| 6f 73 69 74 69 6f 6e 20 | 3d 20 62 6c 6b 20 2d 20 |osition |= blk - |
|00002a70| 31 32 00 00 73 72 63 6c | 53 74 72 6e 00 00 00 34 |12..srcl|Strn...4|
|00002a80| 62 73 2e 77 72 69 74 65 | 4c 6f 6e 67 28 71 29 20 |bs.write|Long(q) |
|00002a90| 20 20 20 20 20 20 20 20 | 2f 2f 20 27 62 6c 6b 27 | |// 'blk'|
|00002aa0| 20 70 6f 69 6e 74 73 20 | 74 6f 20 62 6c 6f 63 6b | points |to block|
|00002ab0| 20 27 71 27 73 72 63 6c | 53 74 72 6e 00 00 00 31 | 'q'srcl|Strn...1|
|00002ac0| 62 73 2e 77 72 69 74 65 | 4c 6f 6e 67 28 70 29 20 |bs.write|Long(p) |
|00002ad0| 20 20 20 20 20 20 20 20 | 2f 2f 20 20 61 6e 64 20 | |// and |
|00002ae0| 62 61 63 6b 20 74 6f 20 | 62 6c 6f 63 6b 20 27 70 |back to |block 'p|
|00002af0| 27 00 00 00 73 72 63 6c | 53 74 72 6e 00 00 00 2f |'...srcl|Strn.../|
|00002b00| 69 66 20 71 20 3c 3e 20 | 30 20 74 68 65 6e 20 20 |if q <> |0 then |
|00002b10| 20 20 20 20 20 20 20 20 | 2f 2f 20 49 66 20 62 6c | |// If bl|
|00002b20| 6f 63 6b 20 27 71 27 20 | 65 78 69 73 74 73 2c 00 |ock 'q' |exists,.|
|00002b30| 73 72 63 6c 53 74 72 6e | 00 00 00 30 62 73 2e 70 |srclStrn|...0bs.p|
|00002b40| 6f 73 69 74 69 6f 6e 20 | 3d 20 71 20 2d 20 38 20 |osition |= q - 8 |
|00002b50| 20 20 2f 2f 20 69 74 20 | 70 6f 69 6e 74 73 20 62 | // it |points b|
|00002b60| 61 63 6b 20 61 74 20 27 | 62 6c 6b 27 73 72 63 6c |ack at '|blk'srcl|
|00002b70| 53 74 72 6e 00 00 00 11 | 62 73 2e 77 72 69 74 65 |Strn....|bs.write|
|00002b80| 4c 6f 6e 67 28 62 6c 6b | 29 00 00 00 73 72 63 6c |Long(blk|)...srcl|
|00002b90| 53 74 72 6e 00 00 00 06 | 65 6e 64 20 69 66 00 00 |Strn....|end if..|
|00002ba0| 73 72 63 6c 53 74 72 6e | 00 00 00 07 45 6e 64 20 |srclStrn|....End |
|00002bb0| 53 75 62 00 45 6e 64 47 | 49 6e 74 20 00 00 00 1f |Sub.EndG|Int ....|
|00002bc0| 45 6e 64 47 49 6e 74 20 | 00 00 00 1e 4d 65 74 68 |EndGInt |....Meth|
|00002bd0| 47 72 75 70 00 00 03 b0 | 00 00 00 20 6e 61 6d 65 |Grup....|... name|
|00002be0| 53 74 72 6e 00 00 00 09 | 69 6e 73 65 72 74 50 72 |Strn....|insertPr|
|00002bf0| 65 00 00 00 70 61 72 6d | 53 74 72 6e 00 00 00 30 |e...parm|Strn...0|
|00002c00| 62 73 20 61 73 20 62 69 | 6e 61 72 79 53 74 72 65 |bs as bi|naryStre|
|00002c10| 61 6d 2c 20 62 6c 6b 20 | 61 73 20 69 6e 74 65 67 |am, blk |as integ|
|00002c20| 65 72 2c 20 70 20 61 73 | 20 69 6e 74 65 67 65 72 |er, p as| integer|
|00002c30| 72 73 6c 74 53 74 72 6e | 00 00 00 00 66 6c 61 67 |rsltStrn|....flag|
|00002c40| 49 6e 74 20 00 00 00 00 | 73 6f 72 63 47 72 75 70 |Int ....|sorcGrup|
|00002c50| 00 00 03 28 00 00 00 21 | 73 74 73 72 49 6e 74 20 |...(...!|stsrInt |
|00002c60| 00 00 00 0c 73 74 73 63 | 49 6e 74 20 00 00 00 2f |....stsc|Int .../|
|00002c70| 6e 64 73 72 49 6e 74 20 | 00 00 00 0c 6e 64 73 63 |ndsrInt |....ndsc|
|00002c80| 49 6e 74 20 00 00 00 2f | 73 72 63 6c 53 74 72 6e |Int .../|srclStrn|
|00002c90| 00 00 00 3f 53 75 62 20 | 69 6e 73 65 72 74 50 72 |...?Sub |insertPr|
|00002ca0| 65 28 62 73 20 61 73 20 | 62 69 6e 61 72 79 53 74 |e(bs as |binarySt|
|00002cb0| 72 65 61 6d 2c 20 62 6c | 6b 20 61 73 20 69 6e 74 |ream, bl|k as int|
|00002cc0| 65 67 65 72 2c 20 70 20 | 61 73 20 69 6e 74 65 67 |eger, p |as integ|
|00002cd0| 65 72 29 00 73 72 63 6c | 53 74 72 6e 00 00 00 39 |er).srcl|Strn...9|
|00002ce0| 2f 2f 20 49 6e 73 65 72 | 74 73 20 74 68 65 20 62 |// Inser|ts the b|
|00002cf0| 6c 6f 63 6b 20 70 6f 69 | 6e 74 65 64 20 74 6f 20 |lock poi|nted to |
|00002d00| 62 79 20 27 62 6c 6b 27 | 20 62 65 66 6f 72 65 20 |by 'blk'| before |
|00002d10| 74 68 65 20 62 6c 6f 63 | 6b 00 00 00 73 72 63 6c |the bloc|k...srcl|
|00002d20| 53 74 72 6e 00 00 00 15 | 2f 2f 20 70 6f 69 6e 74 |Strn....|// point|
|00002d30| 65 64 20 74 6f 20 62 79 | 20 27 70 27 2e 00 00 00 |ed to by| 'p'....|
|00002d40| 73 72 63 6c 53 74 72 6e | 00 00 00 10 64 69 6d 20 |srclStrn|....dim |
|00002d50| 71 20 61 73 20 69 6e 74 | 65 67 65 72 73 72 63 6c |q as int|egersrcl|
|00002d60| 53 74 72 6e 00 00 00 13 | 62 73 2e 70 6f 73 69 74 |Strn....|bs.posit|
|00002d70| 69 6f 6e 20 3d 20 70 20 | 2d 20 38 00 73 72 63 6c |ion = p |- 8.srcl|
|00002d80| 53 74 72 6e 00 00 00 36 | 71 20 3d 20 62 73 2e 72 |Strn...6|q = bs.r|
|00002d90| 65 61 64 4c 6f 6e 67 20 | 20 20 20 20 20 20 20 20 |eadLong | |
|00002da0| 2f 2f 20 27 71 27 20 69 | 73 20 74 68 65 20 62 6c |// 'q' i|s the bl|
|00002db0| 6f 63 6b 20 62 65 66 6f | 72 65 20 27 70 27 00 00 |ock befo|re 'p'..|
|00002dc0| 73 72 63 6c 53 74 72 6e | 00 00 00 16 62 73 2e 70 |srclStrn|....bs.p|
|00002dd0| 6f 73 69 74 69 6f 6e 20 | 3d 20 62 6c 6b 20 2d 20 |osition |= blk - |
|00002de0| 31 32 00 00 73 72 63 6c | 53 74 72 6e 00 00 00 32 |12..srcl|Strn...2|
|00002df0| 62 73 2e 77 72 69 74 65 | 4c 6f 6e 67 28 70 29 20 |bs.write|Long(p) |
|00002e00| 20 20 20 20 20 20 20 20 | 2f 2f 20 27 62 6c 6b 27 | |// 'blk'|
|00002e10| 20 70 6f 69 6e 74 73 20 | 20 6f 6e 20 74 6f 20 27 | points | on to '|
|00002e20| 70 27 00 00 73 72 63 6c | 53 74 72 6e 00 00 00 2a |p'..srcl|Strn...*|
|00002e30| 62 73 2e 77 72 69 74 65 | 4c 6f 6e 67 28 71 29 20 |bs.write|Long(q) |
|00002e40| 20 20 20 20 20 20 20 20 | 2f 2f 20 61 6e 64 20 62 | |// and b|
|00002e50| 61 63 6b 20 74 6f 20 27 | 71 27 00 00 73 72 63 6c |ack to '|q'..srcl|
|00002e60| 53 74 72 6e 00 00 00 13 | 62 73 2e 70 6f 73 69 74 |Strn....|bs.posit|
|00002e70| 69 6f 6e 20 3d 20 70 20 | 2d 20 38 00 73 72 63 6c |ion = p |- 8.srcl|
|00002e80| 53 74 72 6e 00 00 00 33 | 62 73 2e 77 72 69 74 65 |Strn...3|bs.write|
|00002e90| 4c 6f 6e 67 28 62 6c 6b | 29 20 20 20 20 20 20 20 |Long(blk|) |
|00002ea0| 2f 2f 20 27 70 27 20 70 | 6f 69 6e 74 73 20 62 61 |// 'p' p|oints ba|
|00002eb0| 63 6b 20 74 6f 20 27 62 | 6c 6b 27 00 73 72 63 6c |ck to 'b|lk'.srcl|
|00002ec0| 53 74 72 6e 00 00 00 30 | 69 66 20 71 20 3c 3e 20 |Strn...0|if q <> |
|00002ed0| 30 20 74 68 65 6e 20 20 | 20 20 20 20 20 20 20 20 |0 then | |
|00002ee0| 2f 2f 20 49 66 20 62 6c | 6f 63 6b 20 27 71 27 20 |// If bl|ock 'q' |
|00002ef0| 65 78 69 73 74 73 2c 20 | 73 72 63 6c 53 74 72 6e |exists, |srclStrn|
|00002f00| 00 00 00 2f 62 73 2e 70 | 6f 73 69 74 69 6f 6e 20 |.../bs.p|osition |
|00002f10| 3d 20 71 20 2d 20 31 32 | 20 20 2f 2f 20 69 74 20 |= q - 12| // it |
|00002f20| 6d 75 73 74 20 70 6f 69 | 6e 74 20 74 6f 20 27 62 |must poi|nt to 'b|
|00002f30| 6c 6b 27 00 73 72 63 6c | 53 74 72 6e 00 00 00 11 |lk'.srcl|Strn....|
|00002f40| 62 73 2e 77 72 69 74 65 | 4c 6f 6e 67 28 62 6c 6b |bs.write|Long(blk|
|00002f50| 29 00 00 00 73 72 63 6c | 53 74 72 6e 00 00 00 06 |)...srcl|Strn....|
|00002f60| 65 6e 64 20 69 66 00 00 | 73 72 63 6c 53 74 72 6e |end if..|srclStrn|
|00002f70| 00 00 00 07 45 6e 64 20 | 53 75 62 00 45 6e 64 47 |....End |Sub.EndG|
|00002f80| 49 6e 74 20 00 00 00 21 | 45 6e 64 47 49 6e 74 20 |Int ...!|EndGInt |
|00002f90| 00 00 00 20 4d 65 74 68 | 47 72 75 70 00 00 03 0c |... Meth|Grup....|
|00002fa0| 00 00 00 22 6e 61 6d 65 | 53 74 72 6e 00 00 00 0b |..."name|Strn....|
|00002fb0| 6e 46 72 65 65 42 6c 6f | 63 6b 73 00 70 61 72 6d |nFreeBlo|cks.parm|
|00002fc0| 53 74 72 6e 00 00 00 20 | 62 73 20 61 73 20 62 69 |Strn... |bs as bi|
|00002fd0| 6e 61 72 79 53 74 72 65 | 61 6d 2c 20 69 20 61 73 |naryStre|am, i as|
|00002fe0| 20 69 6e 74 65 67 65 72 | 72 73 6c 74 53 74 72 6e | integer|rsltStrn|
|00002ff0| 00 00 00 07 69 6e 74 65 | 67 65 72 00 66 6c 61 67 |....inte|ger.flag|
|00003000| 49 6e 74 20 00 00 00 00 | 73 6f 72 63 47 72 75 70 |Int ....|sorcGrup|
|00003010| 00 00 02 8c 00 00 00 23 | 73 74 73 72 49 6e 74 20 |.......#|stsrInt |
|00003020| 00 00 00 0d 73 74 73 63 | 49 6e 74 20 00 00 00 08 |....stsc|Int ....|
|00003030| 6e 64 73 72 49 6e 74 20 | 00 00 00 0d 6e 64 73 63 |ndsrInt |....ndsc|
|00003040| 49 6e 74 20 00 00 00 08 | 73 72 63 6c 53 74 72 6e |Int ....|srclStrn|
|00003050| 00 00 00 41 46 75 6e 63 | 74 69 6f 6e 20 6e 46 72 |...AFunc|tion nFr|
|00003060| 65 65 42 6c 6f 63 6b 73 | 28 62 73 20 61 73 20 62 |eeBlocks|(bs as b|
|00003070| 69 6e 61 72 79 53 74 72 | 65 61 6d 2c 20 69 20 61 |inaryStr|eam, i a|
|00003080| 73 20 69 6e 74 65 67 65 | 72 29 20 41 73 20 69 6e |s intege|r) As in|
|00003090| 74 65 67 65 72 00 00 00 | 73 72 63 6c 53 74 72 6e |teger...|srclStrn|
|000030a0| 00 00 00 37 2f 2f 20 52 | 65 74 75 72 6e 73 20 74 |...7// R|eturns t|
|000030b0| 68 65 20 6e 75 6d 62 65 | 72 20 6f 66 20 66 72 65 |he numbe|r of fre|
|000030c0| 65 20 62 6c 6f 63 6b 73 | 20 6f 66 20 74 79 70 65 |e blocks| of type|
|000030d0| 20 27 69 27 20 69 6e 20 | 74 68 65 00 73 72 63 6c | 'i' in |the.srcl|
|000030e0| 53 74 72 6e 00 00 00 28 | 2f 2f 20 64 61 74 61 20 |Strn...(|// data |
|000030f0| 73 74 72 75 63 74 75 72 | 65 20 6f 6e 20 62 69 6e |structur|e on bin|
|00003100| 61 72 79 20 73 74 72 65 | 61 6d 20 27 62 73 27 2e |ary stre|am 'bs'.|
|00003110| 73 72 63 6c 53 74 72 6e | 00 00 00 13 64 69 6d 20 |srclStrn|....dim |
|00003120| 6e 2c 20 70 20 61 73 20 | 69 6e 74 65 67 65 72 00 |n, p as |integer.|
|00003130| 73 72 63 6c 53 74 72 6e | 00 00 00 31 70 20 3d 20 |srclStrn|...1p = |
|00003140| 38 20 2b 20 34 2a 6e 75 | 6d 4c 69 73 74 73 20 2b |8 + 4*nu|mLists +|
|00003150| 20 34 2a 69 20 20 2f 2f | 20 61 64 64 72 65 73 73 | 4*i //| address|
|00003160| 20 6f 66 20 66 72 65 65 | 20 6c 69 73 74 00 00 00 | of free| list...|
|00003170| 73 72 63 6c 53 74 72 6e | 00 00 00 0f 62 73 2e 70 |srclStrn|....bs.p|
|00003180| 6f 73 69 74 69 6f 6e 20 | 3d 20 70 00 73 72 63 6c |osition |= p.srcl|
|00003190| 53 74 72 6e 00 00 00 2f | 70 20 3d 20 62 73 2e 72 |Strn.../|p = bs.r|
|000031a0| 65 61 64 4c 6f 6e 67 20 | 20 20 20 20 20 20 20 20 |eadLong | |
|000031b0| 20 20 2f 2f 20 66 69 72 | 73 74 20 62 6c 6f 63 6b | // fir|st block|
|000031c0| 20 28 6f 72 20 30 29 00 | 73 72 63 6c 53 74 72 6e | (or 0).|srclStrn|
|000031d0| 00 00 00 05 6e 20 3d 20 | 30 00 00 00 73 72 63 6c |....n = |0...srcl|
|000031e0| 53 74 72 6e 00 00 00 0c | 77 68 69 6c 65 20 70 20 |Strn....|while p |
|000031f0| 3c 3e 20 30 73 72 63 6c | 53 74 72 6e 00 00 00 09 |<> 0srcl|Strn....|
|00003200| 6e 20 3d 20 6e 20 2b 20 | 31 00 00 00 73 72 63 6c |n = n + |1...srcl|
|00003210| 53 74 72 6e 00 00 00 30 | 62 73 2e 70 6f 73 69 74 |Strn...0|bs.posit|
|00003220| 69 6f 6e 20 3d 20 70 20 | 2d 20 31 32 20 20 20 20 |ion = p |- 12 |
|00003230| 2f 2f 20 70 6f 69 6e 74 | 65 72 20 74 6f 20 6e 65 |// point|er to ne|
|00003240| 78 74 20 62 6c 6f 63 6b | 73 72 63 6c 53 74 72 6e |xt block|srclStrn|
|00003250| 00 00 00 10 70 20 3d 20 | 62 73 2e 72 65 61 64 4c |....p = |bs.readL|
|00003260| 6f 6e 67 20 73 72 63 6c | 53 74 72 6e 00 00 00 04 |ong srcl|Strn....|
|00003270| 77 65 6e 64 73 72 63 6c | 53 74 72 6e 00 00 00 08 |wendsrcl|Strn....|
|00003280| 72 65 74 75 72 6e 20 6e | 73 72 63 6c 53 74 72 6e |return n|srclStrn|
|00003290| 00 00 00 0c 45 6e 64 20 | 46 75 6e 63 74 69 6f 6e |....End |Function|
|000032a0| 45 6e 64 47 49 6e 74 20 | 00 00 00 23 45 6e 64 47 |EndGInt |...#EndG|
|000032b0| 49 6e 74 20 00 00 00 22 | 4d 65 74 68 47 72 75 70 |Int ..."|MethGrup|
|000032c0| 00 00 04 10 00 00 00 24 | 6e 61 6d 65 53 74 72 6e |.......$|nameStrn|
|000032d0| 00 00 00 0a 6c 69 73 74 | 54 6f 54 65 78 74 00 00 |....list|ToText..|
|000032e0| 70 61 72 6d 53 74 72 6e | 00 00 00 23 62 73 20 61 |parmStrn|...#bs a|
|000032f0| 73 20 62 69 6e 61 72 79 | 53 74 72 65 61 6d 2c 20 |s binary|Stream, |
|00003300| 6c 69 73 74 20 61 73 20 | 69 6e 74 65 67 65 72 00 |list as |integer.|
|00003310| 72 73 6c 74 53 74 72 6e | 00 00 00 06 73 74 72 69 |rsltStrn|....stri|
|00003320| 6e 67 00 00 66 6c 61 67 | 49 6e 74 20 00 00 00 00 |ng..flag|Int ....|
|00003330| 73 6f 72 63 47 72 75 70 | 00 00 03 8c 00 00 00 25 |sorcGrup|.......%|
|00003340| 73 74 73 72 49 6e 74 20 | 00 00 00 0f 73 74 73 63 |stsrInt |....stsc|
|00003350| 49 6e 74 20 00 00 00 14 | 6e 64 73 72 49 6e 74 20 |Int ....|ndsrInt |
|00003360| 00 00 00 0f 6e 64 73 63 | 49 6e 74 20 00 00 00 14 |....ndsc|Int ....|
|00003370| 73 72 63 6c 53 74 72 6e | 00 00 00 42 46 75 6e 63 |srclStrn|...BFunc|
|00003380| 74 69 6f 6e 20 6c 69 73 | 74 54 6f 54 65 78 74 28 |tion lis|tToText(|
|00003390| 62 73 20 61 73 20 62 69 | 6e 61 72 79 53 74 72 65 |bs as bi|naryStre|
|000033a0| 61 6d 2c 20 6c 69 73 74 | 20 61 73 20 69 6e 74 65 |am, list| as inte|
|000033b0| 67 65 72 29 20 41 73 20 | 73 74 72 69 6e 67 00 00 |ger) As |string..|
|000033c0| 73 72 63 6c 53 74 72 6e | 00 00 00 38 2f 2f 20 52 |srclStrn|...8// R|
|000033d0| 65 74 75 72 6e 73 20 61 | 73 20 61 20 73 74 72 69 |eturns a|s a stri|
|000033e0| 6e 67 20 74 68 65 20 6c | 69 73 74 20 73 74 6f 72 |ng the l|ist stor|
|000033f0| 65 64 20 69 6e 20 74 68 | 65 20 66 69 6c 65 20 77 |ed in th|e file w|
|00003400| 68 6f 73 65 73 72 63 6c | 53 74 72 6e 00 00 00 3b |hosesrcl|Strn...;|
|00003410| 2f 2f 20 66 69 72 73 74 | 20 62 6c 6f 63 6b 20 69 |// first| block i|
|00003420| 73 20 70 6f 69 6e 74 65 | 64 20 74 6f 20 62 79 20 |s pointe|d to by |
|00003430| 27 6c 69 73 74 27 20 69 | 6e 20 74 68 65 20 73 74 |'list' i|n the st|
|00003440| 72 65 61 6d 20 27 62 73 | 27 2e 20 00 73 72 63 6c |ream 'bs|'. .srcl|
|00003450| 53 74 72 6e 00 00 00 31 | 2f 2f 20 49 66 20 74 68 |Strn...1|// If th|
|00003460| 65 20 6c 69 73 74 20 69 | 73 20 65 6d 70 74 79 2c |e list i|s empty,|
|00003470| 20 74 68 65 20 66 75 6e | 63 74 69 6f 6e 20 72 65 | the fun|ction re|
|00003480| 74 75 72 6e 73 20 22 22 | 2e 00 00 00 73 72 63 6c |turns ""|....srcl|
|00003490| 53 74 72 6e 00 00 00 0f | 64 69 6d 20 73 20 61 73 |Strn....|dim s as|
|000034a0| 20 73 74 72 69 6e 67 00 | 73 72 63 6c 53 74 72 6e | string.|srclStrn|
|000034b0| 00 00 00 1a 64 69 6d 20 | 70 2c 20 6c 6e 2c 20 73 |....dim |p, ln, s|
|000034c0| 69 7a 65 20 61 73 20 69 | 6e 74 65 67 65 72 00 00 |ize as i|nteger..|
|000034d0| 73 72 63 6c 53 74 72 6e | 00 00 00 20 73 69 7a 65 |srclStrn|... size|
|000034e0| 20 3d 20 62 53 69 7a 65 | 73 28 74 65 78 74 4c 69 | = bSize|s(textLi|
|000034f0| 73 74 42 6c 6f 63 6b 54 | 79 70 65 29 73 72 63 6c |stBlockT|ype)srcl|
|00003500| 53 74 72 6e 00 00 00 08 | 70 20 3d 20 6c 69 73 74 |Strn....|p = list|
|00003510| 73 72 63 6c 53 74 72 6e | 00 00 00 0d 69 66 20 70 |srclStrn|....if p|
|00003520| 20 3d 20 30 20 74 68 65 | 6e 00 00 00 73 72 63 6c | = 0 the|n...srcl|
|00003530| 53 74 72 6e 00 00 00 09 | 72 65 74 75 72 6e 20 22 |Strn....|return "|
|00003540| 22 00 00 00 73 72 63 6c | 53 74 72 6e 00 00 00 06 |"...srcl|Strn....|
|00003550| 65 6e 64 20 69 66 00 00 | 73 72 63 6c 53 74 72 6e |end if..|srclStrn|
|00003560| 00 00 00 2a 2f 2f 20 73 | 63 61 6e 20 74 68 65 20 |...*// s|can the |
|00003570| 6c 69 73 74 20 26 20 62 | 75 69 6c 64 20 74 68 65 |list & b|uild the|
|00003580| 20 73 74 72 69 6e 67 20 | 69 6e 20 27 73 27 00 00 | string |in 's'..|
|00003590| 73 72 63 6c 53 74 72 6e | 00 00 00 06 73 20 3d 20 |srclStrn|....s = |
|000035a0| 22 22 00 00 73 72 63 6c | 53 74 72 6e 00 00 00 0c |""..srcl|Strn....|
|000035b0| 77 68 69 6c 65 20 70 20 | 3c 3e 20 30 73 72 63 6c |while p |<> 0srcl|
|000035c0| 53 74 72 6e 00 00 00 0f | 62 73 2e 70 6f 73 69 74 |Strn....|bs.posit|
|000035d0| 69 6f 6e 20 3d 20 70 00 | 73 72 63 6c 53 74 72 6e |ion = p.|srclStrn|
|000035e0| 00 00 00 15 73 20 3d 20 | 73 20 2b 20 62 73 2e 72 |....s = |s + bs.r|
|000035f0| 65 61 64 28 73 69 7a 65 | 29 00 00 00 73 72 63 6c |ead(size|)...srcl|
|00003600| 53 74 72 6e 00 00 00 14 | 70 20 3d 20 6e 65 78 74 |Strn....|p = next|
|00003610| 42 6c 6f 63 6b 28 62 73 | 2c 20 70 29 73 72 63 6c |Block(bs|, p)srcl|
|00003620| 53 74 72 6e 00 00 00 04 | 77 65 6e 64 73 72 63 6c |Strn....|wendsrcl|
|00003630| 53 74 72 6e 00 00 00 31 | 2f 2f 20 67 65 74 20 74 |Strn...1|// get t|
|00003640| 68 65 20 6c 65 6e 67 74 | 68 20 61 6e 64 20 74 72 |he lengt|h and tr|
|00003650| 69 6d 20 74 68 65 20 73 | 74 72 69 6e 67 20 61 63 |im the s|tring ac|
|00003660| 63 6f 72 64 69 6e 67 6c | 79 00 00 00 73 72 63 6c |cordingl|y...srcl|
|00003670| 53 74 72 6e 00 00 00 16 | 6c 6e 20 3d 20 76 61 6c |Strn....|ln = val|
|00003680| 28 67 65 74 53 74 72 69 | 6e 67 28 73 29 29 00 00 |(getStri|ng(s))..|
|00003690| 73 72 63 6c 53 74 72 6e | 00 00 00 12 72 65 74 75 |srclStrn|....retu|
|000036a0| 72 6e 20 6c 65 66 74 28 | 73 2c 20 6c 6e 29 00 00 |rn left(|s, ln)..|
|000036b0| 73 72 63 6c 53 74 72 6e | 00 00 00 0c 45 6e 64 20 |srclStrn|....End |
|000036c0| 46 75 6e 63 74 69 6f 6e | 45 6e 64 47 49 6e 74 20 |Function|EndGInt |
|000036d0| 00 00 00 25 45 6e 64 47 | 49 6e 74 20 00 00 00 24 |...%EndG|Int ...$|
|000036e0| 4d 65 74 68 47 72 75 70 | 00 00 05 e8 00 00 00 26 |MethGrup|.......&|
|000036f0| 6e 61 6d 65 53 74 72 6e | 00 00 00 0a 74 65 78 74 |nameStrn|....text|
|00003700| 54 6f 4c 69 73 74 00 00 | 70 61 72 6d 53 74 72 6e |ToList..|parmStrn|
|00003710| 00 00 00 21 62 73 20 61 | 73 20 62 69 6e 61 72 79 |...!bs a|s binary|
|00003720| 53 74 72 65 61 6d 2c 20 | 74 78 74 20 61 73 20 73 |Stream, |txt as s|
|00003730| 74 72 69 6e 67 00 00 00 | 72 73 6c 74 53 74 72 6e |tring...|rsltStrn|
|00003740| 00 00 00 07 69 6e 74 65 | 67 65 72 00 66 6c 61 67 |....inte|ger.flag|
|00003750| 49 6e 74 20 00 00 00 00 | 73 6f 72 63 47 72 75 70 |Int ....|sorcGrup|
|00003760| 00 00 05 64 00 00 00 27 | 73 74 73 72 49 6e 74 20 |...d...'|stsrInt |
|00003770| 00 00 00 1a 73 74 73 63 | 49 6e 74 20 00 00 00 19 |....stsc|Int ....|
|00003780| 6e 64 73 72 49 6e 74 20 | 00 00 00 1a 6e 64 73 63 |ndsrInt |....ndsc|
|00003790| 49 6e 74 20 00 00 00 19 | 73 72 63 6c 53 74 72 6e |Int ....|srclStrn|
|000037a0| 00 00 00 41 46 75 6e 63 | 74 69 6f 6e 20 74 65 78 |...AFunc|tion tex|
|000037b0| 74 54 6f 4c 69 73 74 28 | 62 73 20 61 73 20 62 69 |tToList(|bs as bi|
|000037c0| 6e 61 72 79 53 74 72 65 | 61 6d 2c 20 74 78 74 20 |naryStre|am, txt |
|000037d0| 61 73 20 73 74 72 69 6e | 67 29 20 41 73 20 69 6e |as strin|g) As in|
|000037e0| 74 65 67 65 72 00 00 00 | 73 72 63 6c 53 74 72 6e |teger...|srclStrn|
|000037f0| 00 00 00 39 2f 2f 20 53 | 74 6f 72 65 73 20 74 68 |...9// S|tores th|
|00003800| 65 20 74 65 78 74 20 27 | 74 78 74 27 20 61 73 20 |e text '|txt' as |
|00003810| 61 20 6c 69 73 74 20 6f | 66 20 62 6c 6f 63 6b 73 |a list o|f blocks|
|00003820| 20 69 6e 20 74 68 65 20 | 66 69 6c 65 20 00 00 00 | in the |file ...|
|00003830| 73 72 63 6c 53 74 72 6e | 00 00 00 38 2f 2f 20 61 |srclStrn|...8// a|
|00003840| 6e 64 20 72 65 74 75 72 | 6e 73 20 61 20 70 6f 69 |nd retur|ns a poi|
|00003850| 6e 74 65 72 20 74 6f 20 | 74 68 65 20 66 69 72 73 |nter to |the firs|
|00003860| 74 20 62 6c 6f 63 6b 2e | 20 49 66 20 74 68 65 20 |t block.| If the |
|00003870| 74 65 78 74 73 72 63 6c | 53 74 72 6e 00 00 00 21 |textsrcl|Strn...!|
|00003880| 2f 2f 20 69 73 20 22 22 | 2c 20 74 68 65 20 66 75 |// is ""|, the fu|
|00003890| 6e 63 74 69 6f 6e 20 72 | 65 74 75 72 6e 73 20 30 |nction r|eturns 0|
|000038a0| 2e 00 00 00 73 72 63 6c | 53 74 72 6e 00 00 00 13 |....srcl|Strn....|
|000038b0| 64 69 6d 20 73 2c 20 73 | 31 20 61 73 20 73 74 72 |dim s, s|1 as str|
|000038c0| 69 6e 67 00 73 72 63 6c | 53 74 72 6e 00 00 00 29 |ing.srcl|Strn...)|
|000038d0| 64 69 6d 20 6c 6e 2c 20 | 6c 69 73 74 48 65 61 64 |dim ln, |listHead|
|000038e0| 2c 20 62 6c 6b 2c 20 70 | 2c 20 73 69 7a 65 20 61 |, blk, p|, size a|
|000038f0| 73 20 69 6e 74 65 67 65 | 72 00 00 00 73 72 63 6c |s intege|r...srcl|
|00003900| 53 74 72 6e 00 00 00 14 | 64 69 6d 20 66 69 72 73 |Strn....|dim firs|
|00003910| 74 20 61 73 20 62 6f 6f | 6c 65 61 6e 73 72 63 6c |t as boo|leansrcl|
|00003920| 53 74 72 6e 00 00 00 20 | 73 69 7a 65 20 3d 20 62 |Strn... |size = b|
|00003930| 53 69 7a 65 73 28 74 65 | 78 74 4c 69 73 74 42 6c |Sizes(te|xtListBl|
|00003940| 6f 63 6b 54 79 70 65 29 | 73 72 63 6c 53 74 72 6e |ockType)|srclStrn|
|00003950| 00 00 00 0d 6c 6e 20 3d | 20 6c 65 6e 28 74 78 74 |....ln =| len(txt|
|00003960| 29 00 00 00 73 72 63 6c | 53 74 72 6e 00 00 00 0e |)...srcl|Strn....|
|00003970| 69 66 20 6c 6e 20 3d 20 | 30 20 74 68 65 6e 00 00 |if ln = |0 then..|
|00003980| 73 72 63 6c 53 74 72 6e | 00 00 00 08 72 65 74 75 |srclStrn|....retu|
|00003990| 72 6e 20 30 73 72 63 6c | 53 74 72 6e 00 00 00 06 |rn 0srcl|Strn....|
|000039a0| 65 6e 64 20 69 66 00 00 | 73 72 63 6c 53 74 72 6e |end if..|srclStrn|
|000039b0| 00 00 00 33 2f 2f 20 50 | 75 74 20 61 20 63 68 61 |...3// P|ut a cha|
|000039c0| 72 61 63 74 65 72 20 63 | 6f 75 6e 74 20 61 6e 64 |racter c|ount and|
|000039d0| 20 45 53 43 20 61 74 20 | 73 74 61 72 74 20 6f 66 | ESC at |start of|
|000039e0| 20 73 74 72 69 6e 67 00 | 73 72 63 6c 53 74 72 6e | string.|srclStrn|
|000039f0| 00 00 00 1c 73 31 20 3d | 20 73 74 72 28 6c 6e 29 |....s1 =| str(ln)|
|00003a00| 20 2b 20 63 68 72 28 32 | 37 29 20 2b 20 74 78 74 | + chr(2|7) + txt|
|00003a10| 73 72 63 6c 53 74 72 6e | 00 00 00 0c 6c 6e 20 3d |srclStrn|....ln =|
|00003a20| 20 6c 65 6e 28 73 31 29 | 73 72 63 6c 53 74 72 6e | len(s1)|srclStrn|
|00003a30| 00 00 00 3a 66 69 72 73 | 74 20 3d 20 74 72 75 65 |...:firs|t = true|
|00003a40| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003a50| 2f 2f 20 74 6f 20 69 64 | 65 6e 74 69 66 79 20 74 |// to id|entify t|
|00003a60| 68 65 20 66 69 72 73 74 | 20 62 6c 6f 63 6b 00 00 |he first| block..|
|00003a70| 73 72 63 6c 53 74 72 6e | 00 00 00 0c 77 68 69 6c |srclStrn|....whil|
|00003a80| 65 20 6c 6e 20 3e 20 30 | 73 72 63 6c 53 74 72 6e |e ln > 0|srclStrn|
|00003a90| 00 00 00 33 73 20 3d 20 | 6c 65 66 74 28 73 31 2c |...3s = |left(s1,|
|00003aa0| 20 73 69 7a 65 29 20 20 | 20 20 20 20 20 20 2f 2f | size) | //|
|00003ab0| 20 6c 65 66 74 2d 6d 6f | 73 74 20 27 73 69 7a 65 | left-mo|st 'size|
|00003ac0| 27 20 62 79 74 65 73 00 | 73 72 63 6c 53 74 72 6e |' bytes.|srclStrn|
|00003ad0| 00 00 00 26 73 31 20 3d | 20 72 69 67 68 74 28 73 |...&s1 =| right(s|
|00003ae0| 31 2c 20 6c 6e 20 2d 20 | 73 69 7a 65 29 20 2f 2f |1, ln - |size) //|
|00003af0| 20 72 65 6d 61 69 6e 64 | 65 72 00 00 73 72 63 6c | remaind|er..srcl|
|00003b00| 53 74 72 6e 00 00 00 0e | 6c 6e 20 3d 20 6c 6e 20 |Strn....|ln = ln |
|00003b10| 2d 20 73 69 7a 65 00 00 | 73 72 63 6c 53 74 72 6e |- size..|srclStrn|
|00003b20| 00 00 00 15 62 6c 6b 20 | 3d 20 6e 65 77 42 6c 6f |....blk |= newBlo|
|00003b30| 63 6b 28 62 73 2c 20 31 | 29 00 00 00 73 72 63 6c |ck(bs, 1|)...srcl|
|00003b40| 53 74 72 6e 00 00 00 11 | 62 73 2e 70 6f 73 69 74 |Strn....|bs.posit|
|00003b50| 69 6f 6e 20 3d 20 62 6c | 6b 00 00 00 73 72 63 6c |ion = bl|k...srcl|
|00003b60| 53 74 72 6e 00 00 00 0b | 62 73 2e 77 72 69 74 65 |Strn....|bs.write|
|00003b70| 28 73 29 00 73 72 63 6c | 53 74 72 6e 00 00 00 3c |(s).srcl|Strn...<|
|00003b80| 69 66 20 66 69 72 73 74 | 20 74 68 65 6e 20 20 20 |if first| then |
|00003b90| 20 20 20 20 20 20 20 20 | 20 20 2f 2f 20 66 69 72 | | // fir|
|00003ba0| 73 74 20 62 6c 6f 63 6b | 20 68 6f 6f 6b 65 64 20 |st block| hooked |
|00003bb0| 74 6f 20 27 6c 69 73 74 | 48 65 61 64 73 72 63 6c |to 'list|Headsrcl|
|00003bc0| 53 74 72 6e 00 00 00 0e | 6c 69 73 74 48 65 61 64 |Strn....|listHead|
|00003bd0| 20 3d 20 62 6c 6b 00 00 | 73 72 63 6c 53 74 72 6e | = blk..|srclStrn|
|00003be0| 00 00 00 0d 66 69 72 73 | 74 20 3d 20 66 61 6c 73 |....firs|t = fals|
|00003bf0| 65 00 00 00 73 72 63 6c | 53 74 72 6e 00 00 00 35 |e...srcl|Strn...5|
|00003c00| 65 6c 73 65 20 20 20 20 | 20 20 20 20 20 20 20 20 |else | |
|00003c10| 20 20 20 20 20 20 20 20 | 20 20 2f 2f 20 72 65 6d | | // rem|
|00003c20| 61 69 6e 64 65 72 20 61 | 74 20 65 6e 64 20 6f 66 |ainder a|t end of|
|00003c30| 20 6c 69 73 74 00 00 00 | 73 72 63 6c 53 74 72 6e | list...|srclStrn|
|00003c40| 00 00 00 17 69 6e 73 65 | 72 74 50 6f 73 74 28 62 |....inse|rtPost(b|
|00003c50| 73 2c 20 62 6c 6b 2c 20 | 70 29 20 00 73 72 63 6c |s, blk, |p) .srcl|
|00003c60| 53 74 72 6e 00 00 00 06 | 65 6e 64 20 69 66 00 00 |Strn....|end if..|
|00003c70| 73 72 63 6c 53 74 72 6e | 00 00 00 07 70 20 3d 20 |srclStrn|....p = |
|00003c80| 62 6c 6b 00 73 72 63 6c | 53 74 72 6e 00 00 00 04 |blk.srcl|Strn....|
|00003c90| 77 65 6e 64 73 72 63 6c | 53 74 72 6e 00 00 00 0f |wendsrcl|Strn....|
|00003ca0| 72 65 74 75 72 6e 20 6c | 69 73 74 48 65 61 64 00 |return l|istHead.|
|00003cb0| 73 72 63 6c 53 74 72 6e | 00 00 00 0c 45 6e 64 20 |srclStrn|....End |
|00003cc0| 46 75 6e 63 74 69 6f 6e | 45 6e 64 47 49 6e 74 20 |Function|EndGInt |
|00003cd0| 00 00 00 27 45 6e 64 47 | 49 6e 74 20 00 00 00 26 |...'EndG|Int ...&|
|00003ce0| 4d 65 74 68 47 72 75 70 | 00 00 04 84 00 00 00 28 |MethGrup|.......(|
|00003cf0| 6e 61 6d 65 53 74 72 6e | 00 00 00 09 67 65 74 53 |nameStrn|....getS|
|00003d00| 74 72 69 6e 67 00 00 00 | 70 61 72 6d 53 74 72 6e |tring...|parmStrn|
|00003d10| 00 00 00 18 62 79 72 65 | 66 20 74 6f 6b 65 6e 53 |....byre|f tokenS|
|00003d20| 74 72 20 61 73 20 73 74 | 72 69 6e 67 72 73 6c 74 |tr as st|ringrslt|
|00003d30| 53 74 72 6e 00 00 00 06 | 73 74 72 69 6e 67 00 00 |Strn....|string..|
|00003d40| 66 6c 61 67 49 6e 74 20 | 00 00 00 00 73 6f 72 63 |flagInt |....sorc|
|00003d50| 47 72 75 70 00 00 04 0c | 00 00 00 29 73 74 73 72 |Grup....|...)stsr|
|00003d60| 49 6e 74 20 00 00 00 04 | 73 74 73 63 49 6e 74 20 |Int ....|stscInt |
|00003d70| 00 00 00 03 6e 64 73 72 | 49 6e 74 20 00 00 00 04 |....ndsr|Int ....|
|00003d80| 6e 64 73 63 49 6e 74 20 | 00 00 00 03 73 72 63 6c |ndscInt |....srcl|
|00003d90| 53 74 72 6e 00 00 00 36 | 46 75 6e 63 74 69 6f 6e |Strn...6|Function|
|00003da0| 20 67 65 74 53 74 72 69 | 6e 67 28 62 79 72 65 66 | getStri|ng(byref|
|00003db0| 20 74 6f 6b 65 6e 53 74 | 72 20 61 73 20 73 74 72 | tokenSt|r as str|
|00003dc0| 69 6e 67 29 20 41 73 20 | 73 74 72 69 6e 67 00 00 |ing) As |string..|
|00003dd0| 73 72 63 6c 53 74 72 6e | 00 00 00 36 2f 2f 20 52 |srclStrn|...6// R|
|00003de0| 65 74 75 72 6e 73 20 74 | 68 65 20 73 74 72 69 6e |eturns t|he strin|
|00003df0| 67 20 66 72 6f 6d 20 74 | 68 65 20 73 74 61 72 74 |g from t|he start|
|00003e00| 20 6f 66 20 27 74 6f 6b | 65 6e 53 74 72 27 2c 20 | of 'tok|enStr', |
|00003e10| 75 70 00 00 73 72 63 6c | 53 74 72 6e 00 00 00 39 |up..srcl|Strn...9|
|00003e20| 2f 2f 20 74 6f 20 74 68 | 65 20 45 53 43 20 63 68 |// to th|e ESC ch|
|00003e30| 61 72 61 63 74 65 72 20 | 28 63 68 72 28 32 37 29 |aracter |(chr(27)|
|00003e40| 29 2c 20 61 6e 64 20 72 | 65 6d 6f 76 65 73 20 61 |), and r|emoves a|
|00003e50| 6c 6c 20 74 68 65 73 65 | 20 00 00 00 73 72 63 6c |ll these| ...srcl|
|00003e60| 53 74 72 6e 00 00 00 38 | 2f 2f 20 63 68 61 72 61 |Strn...8|// chara|
|00003e70| 63 74 65 72 73 20 66 72 | 6f 6d 20 27 74 6f 6b 65 |cters fr|om 'toke|
|00003e80| 6e 53 74 72 27 2e 20 52 | 65 74 75 72 6e 73 20 74 |nStr'. R|eturns t|
|00003e90| 68 65 20 73 74 72 69 6e | 67 20 6d 69 6e 75 73 20 |he strin|g minus |
|00003ea0| 73 72 63 6c 53 74 72 6e | 00 00 00 0b 2f 2f 20 74 |srclStrn|....// t|
|00003eb0| 68 65 20 45 53 43 2e 00 | 73 72 63 6c 53 74 72 6e |he ESC..|srclStrn|
|00003ec0| 00 00 00 35 2f 2f 20 49 | 66 20 74 68 65 72 65 20 |...5// I|f there |
|00003ed0| 69 73 20 6e 6f 20 45 53 | 43 20 61 74 20 74 68 65 |is no ES|C at the|
|00003ee0| 20 65 6e 64 2c 20 74 68 | 65 20 6c 61 73 74 20 73 | end, th|e last s|
|00003ef0| 65 67 6d 65 6e 74 20 6f | 66 00 00 00 73 72 63 6c |egment o|f...srcl|
|00003f00| 53 74 72 6e 00 00 00 36 | 2f 2f 20 27 74 6f 6b 65 |Strn...6|// 'toke|
|00003f10| 6e 53 74 72 27 20 69 73 | 20 72 65 74 75 72 6e 65 |nStr' is| returne|
|00003f20| 64 20 61 6e 64 20 27 74 | 6f 6b 65 6e 53 74 72 27 |d and 't|okenStr'|
|00003f30| 20 69 73 20 73 65 74 20 | 74 6f 20 22 22 2e 00 00 | is set |to ""...|
|00003f40| 73 72 63 6c 53 74 72 6e | 00 00 00 17 64 69 6d 20 |srclStrn|....dim |
|00003f50| 73 2c 20 65 73 63 2c 20 | 63 20 61 73 20 73 74 72 |s, esc, |c as str|
|00003f60| 69 6e 67 00 73 72 63 6c | 53 74 72 6e 00 00 00 14 |ing.srcl|Strn....|
|00003f70| 64 69 6d 20 69 2c 20 6c | 6e 20 61 73 20 69 6e 74 |dim i, l|n as int|
|00003f80| 65 67 65 72 73 72 63 6c | 53 74 72 6e 00 00 00 2a |egersrcl|Strn...*|
|00003f90| 65 73 63 20 3d 20 63 68 | 72 28 32 37 29 20 20 20 |esc = ch|r(27) |
|00003fa0| 20 20 20 20 20 20 2f 2f | 20 74 68 65 20 45 53 43 | //| the ESC|
|00003fb0| 20 63 68 61 72 61 63 74 | 65 72 00 00 73 72 63 6c | charact|er..srcl|
|00003fc0| 53 74 72 6e 00 00 00 05 | 69 20 3d 20 31 00 00 00 |Strn....|i = 1...|
|00003fd0| 73 72 63 6c 53 74 72 6e | 00 00 00 06 73 20 3d 20 |srclStrn|....s = |
|00003fe0| 22 22 00 00 73 72 63 6c | 53 74 72 6e 00 00 00 03 |""..srcl|Strn....|
|00003ff0| 64 6f 20 00 73 72 63 6c | 53 74 72 6e 00 00 00 17 |do .srcl|Strn....|
|00004000| 63 20 3d 20 6d 69 64 28 | 74 6f 6b 65 6e 53 74 72 |c = mid(|tokenStr|
|00004010| 2c 20 69 2c 20 31 29 00 | 73 72 63 6c 53 74 72 6e |, i, 1).|srclStrn|
|00004020| 00 00 00 0f 69 66 20 63 | 20 3d 20 65 73 63 20 74 |....if c| = esc t|
|00004030| 68 65 6e 00 73 72 63 6c | 53 74 72 6e 00 00 00 12 |hen.srcl|Strn....|
|00004040| 6c 6e 20 3d 20 6c 65 6e | 28 74 6f 6b 65 6e 53 74 |ln = len|(tokenSt|
|00004050| 72 29 00 00 73 72 63 6c | 53 74 72 6e 00 00 00 22 |r)..srcl|Strn..."|
|00004060| 74 6f 6b 65 6e 53 74 72 | 20 3d 20 72 69 67 68 74 |tokenStr| = right|
|00004070| 28 74 6f 6b 65 6e 53 74 | 72 2c 20 6c 6e 20 2d 20 |(tokenSt|r, ln - |
|00004080| 69 29 00 00 73 72 63 6c | 53 74 72 6e 00 00 00 08 |i)..srcl|Strn....|
|00004090| 72 65 74 75 72 6e 20 73 | 73 72 63 6c 53 74 72 6e |return s|srclStrn|
|000040a0| 00 00 00 06 65 6e 64 20 | 69 66 00 00 73 72 63 6c |....end |if..srcl|
|000040b0| 53 74 72 6e 00 00 00 0e | 69 66 20 63 20 3d 20 22 |Strn....|if c = "|
|000040c0| 22 20 74 68 65 6e 00 00 | 73 72 63 6c 53 74 72 6e |" then..|srclStrn|
|000040d0| 00 00 00 0d 74 6f 6b 65 | 6e 53 74 72 20 3d 20 22 |....toke|nStr = "|
|000040e0| 22 00 00 00 73 72 63 6c | 53 74 72 6e 00 00 00 08 |"...srcl|Strn....|
|000040f0| 72 65 74 75 72 6e 20 73 | 73 72 63 6c 53 74 72 6e |return s|srclStrn|
|00004100| 00 00 00 06 65 6e 64 20 | 69 66 00 00 73 72 63 6c |....end |if..srcl|
|00004110| 53 74 72 6e 00 00 00 09 | 73 20 3d 20 73 20 2b 20 |Strn....|s = s + |
|00004120| 63 00 00 00 73 72 63 6c | 53 74 72 6e 00 00 00 09 |c...srcl|Strn....|
|00004130| 69 20 3d 20 69 20 2b 20 | 31 00 00 00 73 72 63 6c |i = i + |1...srcl|
|00004140| 53 74 72 6e 00 00 00 04 | 6c 6f 6f 70 73 72 63 6c |Strn....|loopsrcl|
|00004150| 53 74 72 6e 00 00 00 0c | 45 6e 64 20 46 75 6e 63 |Strn....|End Func|
|00004160| 74 69 6f 6e 45 6e 64 47 | 49 6e 74 20 00 00 00 29 |tionEndG|Int ...)|
|00004170| 45 6e 64 47 49 6e 74 20 | 00 00 00 28 4d 65 74 68 |EndGInt |...(Meth|
|00004180| 47 72 75 70 00 00 01 80 | 00 00 00 2a 6e 61 6d 65 |Grup....|...*name|
|00004190| 53 74 72 6e 00 00 00 0f | 64 65 63 6c 61 72 65 54 |Strn....|declareT|
|000041a0| 65 78 74 4c 69 73 74 00 | 70 61 72 6d 53 74 72 6e |extList.|parmStrn|
|000041b0| 00 00 00 12 62 6c 6b 54 | 79 70 65 20 61 73 20 69 |....blkT|ype as i|
|000041c0| 6e 74 65 67 65 72 00 00 | 72 73 6c 74 53 74 72 6e |nteger..|rsltStrn|
|000041d0| 00 00 00 00 66 6c 61 67 | 49 6e 74 20 00 00 00 00 |....flag|Int ....|
|000041e0| 73 6f 72 63 47 72 75 70 | 00 00 01 10 00 00 00 2b |sorcGrup|.......+|
|000041f0| 73 74 73 72 49 6e 74 20 | 00 00 00 03 73 74 73 63 |stsrInt |....stsc|
|00004200| 49 6e 74 20 00 00 00 1b | 6e 64 73 72 49 6e 74 20 |Int ....|ndsrInt |
|00004210| 00 00 00 03 6e 64 73 63 | 49 6e 74 20 00 00 00 1b |....ndsc|Int ....|
|00004220| 73 72 63 6c 53 74 72 6e | 00 00 00 27 53 75 62 20 |srclStrn|...'Sub |
|00004230| 64 65 63 6c 61 72 65 54 | 65 78 74 4c 69 73 74 28 |declareT|extList(|
|00004240| 62 6c 6b 54 79 70 65 20 | 61 73 20 69 6e 74 65 67 |blkType |as integ|
|00004250| 65 72 29 00 73 72 63 6c | 53 74 72 6e 00 00 00 35 |er).srcl|Strn...5|
|00004260| 2f 2f 20 44 65 63 6c 61 | 72 65 73 20 74 68 61 74 |// Decla|res that|
|00004270| 20 74 65 78 74 20 6c 69 | 73 74 73 20 77 69 6c 6c | text li|sts will|
|00004280| 20 62 65 20 63 6f 6e 73 | 74 72 75 63 74 65 64 20 | be cons|tructed |
|00004290| 75 73 69 6e 67 00 00 00 | 73 72 63 6c 53 74 72 6e |using...|srclStrn|
|000042a0| 00 00 00 1c 2f 2f 20 62 | 6c 6f 63 6b 73 20 6f 66 |....// b|locks of|
|000042b0| 20 74 79 70 65 20 27 62 | 6c 6b 54 79 70 65 27 2e | type 'b|lkType'.|
|000042c0| 73 72 63 6c 53 74 72 6e | 00 00 00 1b 74 65 78 74 |srclStrn|....text|
|000042d0| 4c 69 73 74 42 6c 6f 63 | 6b 54 79 70 65 20 3d 20 |ListBloc|kType = |
|000042e0| 62 6c 6b 54 79 70 65 00 | 73 72 63 6c 53 74 72 6e |blkType.|srclStrn|
|000042f0| 00 00 00 07 45 6e 64 20 | 53 75 62 00 45 6e 64 47 |....End |Sub.EndG|
|00004300| 49 6e 74 20 00 00 00 2b | 45 6e 64 47 49 6e 74 20 |Int ...+|EndGInt |
|00004310| 00 00 00 2a 50 61 64 6e | 50 61 64 6e 00 00 00 f4 |...*Padn|Padn....|
|00004320| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00004330| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00004340| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00004350| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00004360| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00004370| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00004380| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00004390| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000043a0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000043b0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000043c0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000043d0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000043e0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000043f0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00004400| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00004410| 2a 2a 2a 2a 45 4f 46 21 | |****EOF!| |
+--------+-------------------------+-------------------------+--------+--------+